| import os | |
| import subprocess | |
| workspace_dir = "/mnt/workspace/stable-diffusion-webui" | |
| os.chdir(workspace_dir) | |
| def start(): | |
| file_name = "launch.py" | |
| run_command = f"python {file_name} --no-download-sd-model --xformers --listen --skip-version-check --enable-insecure-extension-access --port 6666 --api --share" | |
| subprocess.run(run_command, shell=True) | |
| start() |