mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-14 23:42:35 +08:00
fix python
This commit is contained in:
parent
57d1bba5eb
commit
e09c8a351f
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ venv/
|
|||||||
/web/extensions/*
|
/web/extensions/*
|
||||||
!/web/extensions/logging.js.example
|
!/web/extensions/logging.js.example
|
||||||
!/web/extensions/core/
|
!/web/extensions/core/
|
||||||
|
/tests-ui/data/object_info.json
|
||||||
@ -1,6 +1,6 @@
|
|||||||
const { spawn } = require("child_process");
|
const { spawn } = require("child_process");
|
||||||
const { resolve } = require("path");
|
const { resolve } = require("path");
|
||||||
const { writeFile } = require("fs");
|
const { writeFile, existsSync } = require("fs");
|
||||||
const http = require("http");
|
const http = require("http");
|
||||||
|
|
||||||
async function setup() {
|
async function setup() {
|
||||||
@ -49,7 +49,10 @@ const http = require("http");
|
|||||||
// Start the server on first iteration if it fails to connect
|
// Start the server on first iteration if it fails to connect
|
||||||
console.log("Starting ComfyUI server...");
|
console.log("Starting ComfyUI server...");
|
||||||
|
|
||||||
const python = resolve("../../python_embeded/python.exe");
|
let python = resolve("../../python_embeded/python.exe");
|
||||||
|
if (!existsSync(python)) {
|
||||||
|
python = "python";
|
||||||
|
}
|
||||||
child = spawn(python, ["-s", "ComfyUI/main.py", "--cpu"], { cwd: "../.." });
|
child = spawn(python, ["-s", "ComfyUI/main.py", "--cpu"], { cwd: "../.." });
|
||||||
}
|
}
|
||||||
await new Promise((r) => {
|
await new Promise((r) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user