Spaces:
Paused
Paused
File size: 569 Bytes
8cd2170 99745bb 8cd2170 6d974e6 8cd2170 99745bb 8cd2170 6d974e6 99745bb 8cd2170 99745bb 6d85bdf 8cd2170 99745bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import os
import subprocess
import argparse
COMFYUI_PATH = "./ComfyUI"
def run_comfyui(port):
"""Launch ComfyUI with external access."""
os.chdir(COMFYUI_PATH)
print(f"🚀 Launching ComfyUI on port {port}...")
subprocess.run(f"python main.py --listen 0.0.0.0 --port {port} --disable-auto-launch", shell=True)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run ComfyUI")
parser.add_argument('--port', type=int, default=8000, help='Port to run ComfyUI on')
args = parser.parse_args()
run_comfyui(args.port)
|