mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-13 23:12:35 +08:00
fix cwd?
This commit is contained in:
parent
b3d2c6a57e
commit
ecd7b45d32
@ -51,13 +51,16 @@ async function setup() {
|
|||||||
|
|
||||||
let python = resolve("../../python_embeded/python.exe");
|
let python = resolve("../../python_embeded/python.exe");
|
||||||
let args;
|
let args;
|
||||||
|
let cwd;
|
||||||
if (existsSync(python)) {
|
if (existsSync(python)) {
|
||||||
args = ["-s", "ComfyUI/main.py"];
|
args = ["-s", "ComfyUI/main.py"];
|
||||||
|
cwd = "../..";
|
||||||
} else {
|
} else {
|
||||||
python = "python";
|
python = "python";
|
||||||
args = ["main.py"];
|
args = ["main.py"];
|
||||||
|
cwd = "..";
|
||||||
}
|
}
|
||||||
child = spawn(python, [...args, "--cpu"], { cwd: "../.." });
|
child = spawn(python, [...args, "--cpu"], { cwd });
|
||||||
child.on("error", (err) => {
|
child.on("error", (err) => {
|
||||||
console.log(`Server error (${err})`);
|
console.log(`Server error (${err})`);
|
||||||
i = 30;
|
i = 30;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user