-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstart.js
69 lines (68 loc) · 2.58 KB
/
start.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = {
daemon: true,
run: [
// {
// when: "{{platform === 'darwin' && arch === 'arm64'}}",
// method: "fs.copy",
// params: {
// src: "workflows/default/flux_schnell_mac.template",
// dest: "app/web_custom_versions/Comfy-Org_ComfyUI_frontend/1.2.20/scripts/defaultGraph.js"
// //"dest": "app/web/scripts/defaultGraph.js"
// }
// },
//// {
//// when: "{{platform === 'darwin' && arch === 'x64'}}",
//// },
// {
// when: "{{gpu === 'nvidia'}}",
// method: "fs.copy",
// params: {
// src: "workflows/default/flux_schnell.template",
// //"dest": "app/web/scripts/defaultGraph.js"
// dest: "app/web_custom_versions/Comfy-Org_ComfyUI_frontend/1.2.20/scripts/defaultGraph.js"
// }
// },
//// {
//// when: "{{platform !== 'darwin' && gpu !== 'nvidia'}}",
//// },
{
method: "shell.run",
params: {
venv: "env", // Edit this to customize the venv folder path
env: {
PYTORCH_ENABLE_MPS_FALLBACK: "1",
TOKENIZERS_PARALLELISM: "false"
}, // Edit this to customize environment variables (see documentation)
path: "app", // Edit this to customize the path to start the shell from
message: [
//"{{platform === 'win32' && gpu === 'amd' ? 'python main.py --directml --front-end-version Comfy-Org/[email protected]' : 'python main.py --front-end-version Comfy-Org/[email protected]'}}"
"{{platform === 'win32' && gpu === 'amd' ? 'python main.py --directml' : 'python main.py'}}"
],
on: [{
// The regular expression pattern to monitor.
// When this pattern occurs in the shell terminal, the shell will return,
// and the script will go onto the next step.
"event": "/starting server.+(http:\/\/[a-zA-Z0-9.]+:[0-9]+)/i",
// "done": true will move to the next step while keeping the shell alive.
// "kill": true will move to the next step after killing the shell.
"done": true
}, {
"event": "/errno/i",
"break": false
}, {
"event": "/error:/i",
"break": false
}]
}
},
{
// This step sets the local variable 'url'.
// This local variable will be used in pinokio.js to display the "Open WebUI" tab when the value is set.
method: "local.set",
params: {
// the input.event is the regular expression match object from the previous step
url: "{{input.event[1]}}"
}
}
]
}