mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-02 23:14:49 +08:00
Tweak server/custom node load order
- Load custom nodes after creating server - Add routes after loading custom nodes Custom nodes can now add routes via PromptServer.instance
This commit is contained in:
4
main.py
4
main.py
@@ -40,6 +40,7 @@ if __name__ == "__main__":
|
||||
except:
|
||||
pass
|
||||
|
||||
from nodes import init_custom_nodes
|
||||
import execution
|
||||
import server
|
||||
import folder_paths
|
||||
@@ -98,6 +99,8 @@ if __name__ == "__main__":
|
||||
server = server.PromptServer(loop)
|
||||
q = execution.PromptQueue(server)
|
||||
|
||||
init_custom_nodes()
|
||||
server.add_routes()
|
||||
hijack_progress(server)
|
||||
|
||||
threading.Thread(target=prompt_worker, daemon=True, args=(q,server,)).start()
|
||||
@@ -113,7 +116,6 @@ if __name__ == "__main__":
|
||||
except:
|
||||
address = '127.0.0.1'
|
||||
|
||||
|
||||
dont_print = False
|
||||
if '--dont-print-server' in sys.argv:
|
||||
dont_print = True
|
||||
|
Reference in New Issue
Block a user