mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-15 00:03:06 +00:00
21 lines
432 B
Python
21 lines
432 B
Python
import asyncio
|
|
import os
|
|
import sys
|
|
|
|
|
|
comfy_path = os.path.dirname(os.path.abspath(__file__))
|
|
comfy_path = os.path.join(comfy_path, '..', 'ComfyUI')
|
|
|
|
# change to ComfyUI directory
|
|
os.chdir(comfy_path)
|
|
|
|
# add ComfyUI to path
|
|
sys.path.append(comfy_path)
|
|
|
|
from server import PromptServer
|
|
from execution import PromptQueue
|
|
|
|
loop = asyncio.new_event_loop()
|
|
asyncio.set_event_loop(loop)
|
|
server = PromptServer(loop)
|
|
q = PromptQueue(server) |