File size: 492 Bytes
8cd2170
 
 
6d974e6
8cd2170
 
6d85bdf
8cd2170
 
6d974e6
8cd2170
 
 
 
6d85bdf
8cd2170
 
a12f521
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
import subprocess

COMFYUI_PATH = "./ComfyUI"
PORT = 8000


def run_comfyui():
    """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__":
    run_comfyui()
    print(f"Enable port-forwarding\nssh -L {PORT}:localhost:{PORT} [NAME]@[IP_ADDRESS] -p [SERVER_PORT] -i [PRIVATE_KEY]")