forked from Blizaine/Maestro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.js
More file actions
280 lines (279 loc) · 10 KB
/
Copy pathinstall.js
File metadata and controls
280 lines (279 loc) · 10 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
const vendors = require("./vendor_revisions")
const hunyuan3d2 = vendors.hunyuan3d2
const hunyuan3d21 = vendors.hunyuan3d21
module.exports = {
requires: {
bundle: "ai"
},
run: [
{
when: "{{gpu !== 'nvidia'}}",
method: "notify",
params: {
html: "This app requires an NVIDIA GPU on Windows or Linux."
},
next: null
},
// Optional HuggingFace login. Maestro's default models are all on
// PUBLIC repos, so this is NOT required — but a token lifts HuggingFace's
// anonymous rate limits (helpful for the large model downloads) and
// unlocks any gated models you add later. Non-blocking (wait: false):
// Pinokio stores the token at HF_TOKEN_PATH; skip it and downloads fall
// back to anonymous (launch.py is tolerant of an absent/blocked token).
{
method: "hf.login",
params: { wait: false }
},
{
method: "shell.run",
params: {
venv: "env",
path: "app",
message: [
"uv pip install -r requirements.txt --index-strategy unsafe-best-match",
"uv pip install hf-xet pip"
]
}
},
{
method: "script.start",
params: {
uri: "torch.js",
params: {
venv: "env",
path: "app",
xformers: true
}
}
},
// Install pre-built llama.cpp CUDA kernels for GGUF models if a
// wheel matches the current Python / PyTorch / CUDA combo. Without
// this, mmgp prints "[GGUF][llama.cpp CUDA] kernels unavailable,
// using fallback" at every startup. The helper script is a soft
// no-op when no matching wheel exists (e.g. Linux, or unreleased
// version combo) — the fallback path still works for GGUF models,
// and the default INT8 / BF16 variants don't use these kernels at
// all. Idempotent on re-runs.
{
method: "shell.run",
params: {
venv: "env",
path: "app",
message: "python scripts/install_gguf_kernels.py"
}
},
// Native Hunyuan3D runtime. Dependency isolation is internal because the
// official stack conflicts with Maestro's audio/video Python packages;
// from the user's perspective this is part of the normal Maestro install.
{
when: "{{!exists('" + hunyuan3d2.path + "')}}",
method: "shell.run",
params: {
message: [
"git clone --depth 1 " + hunyuan3d2.url + " " + hunyuan3d2.path,
"git -C " + hunyuan3d2.path + " fetch --depth 1 origin " + hunyuan3d2.revision,
"git -C " + hunyuan3d2.path + " checkout --detach " + hunyuan3d2.revision
]
}
},
{
when: "{{exists('" + hunyuan3d2.path + "/.git')}}",
method: "shell.run",
params: {
path: hunyuan3d2.path,
message: [
"git fetch --depth 1 origin " + hunyuan3d2.revision,
"git checkout --detach " + hunyuan3d2.revision
]
}
},
{
when: "{{!exists('" + hunyuan3d21.path + "')}}",
method: "shell.run",
params: {
message: [
"git clone --depth 1 " + hunyuan3d21.url + " " + hunyuan3d21.path,
"git -C " + hunyuan3d21.path + " fetch --depth 1 origin " + hunyuan3d21.revision,
"git -C " + hunyuan3d21.path + " checkout --detach " + hunyuan3d21.revision
]
}
},
{
when: "{{exists('" + hunyuan3d21.path + "/.git')}}",
method: "shell.run",
params: {
path: hunyuan3d21.path,
message: [
"git fetch --depth 1 origin " + hunyuan3d21.revision,
"git checkout --detach " + hunyuan3d21.revision
]
}
},
{
method: "shell.run",
params: {
conda: {
path: "app/services/hunyuan3d/env",
python: "3.10"
},
message: [
"uv pip install torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0 --index-url https://download.pytorch.org/whl/cu128",
"uv pip install -r app/services/hunyuan3d/requirements.txt"
]
}
},
{
// Clean the nested environment created by the first native-3D migration,
// where conda.path was incorrectly resolved from this extension folder.
when: "{{exists('app/services/hunyuan3d/vendor/Hunyuan3D-2/hy3dgen/texgen/custom_rasterizer/app')}}",
method: "fs.rm",
params: {
path: "app/services/hunyuan3d/vendor/Hunyuan3D-2/hy3dgen/texgen/custom_rasterizer/app"
}
},
{
method: "shell.run",
params: {
conda: { path: "../../../../../env", python: "3.10" },
env: {
CUDA_HOME: "{{path.resolve(path.dirname(which('nvcc')), '..')}}",
CPATH: "{{path.resolve(path.dirname(which('nvcc')), '../targets/x86_64-linux/include')}}",
LIBRARY_PATH: "{{path.resolve(path.dirname(which('nvcc')), '../targets/x86_64-linux/lib')}}",
LD_LIBRARY_PATH: "{{path.resolve(path.dirname(which('nvcc')), '../targets/x86_64-linux/lib')}}"
},
path: "app/services/hunyuan3d/vendor/Hunyuan3D-2/hy3dgen/texgen/custom_rasterizer",
message: "uv pip install --no-build-isolation -e ."
}
},
{
method: "shell.run",
params: {
conda: { path: "../../../../../env", python: "3.10" },
path: "app/services/hunyuan3d/vendor/Hunyuan3D-2/hy3dgen/texgen/differentiable_renderer",
message: "uv pip install --no-build-isolation -e ."
}
},
{
method: "shell.run",
params: {
conda: { path: "../../../../env", python: "3.10" },
env: {
CUDA_HOME: "{{path.resolve(path.dirname(which('nvcc')), '..')}}",
CPATH: "{{path.resolve(path.dirname(which('nvcc')), '../targets/x86_64-linux/include')}}",
LIBRARY_PATH: "{{path.resolve(path.dirname(which('nvcc')), '../targets/x86_64-linux/lib')}}",
LD_LIBRARY_PATH: "{{path.resolve(path.dirname(which('nvcc')), '../targets/x86_64-linux/lib')}}"
},
path: "app/services/hunyuan3d/vendor/Hunyuan3D-2.1/hy3dpaint/custom_rasterizer",
message: "uv pip install --no-build-isolation -e ."
}
},
{
method: "shell.run",
params: {
conda: { path: "../../../../env", python: "3.10" },
shell: "{{which('bash')}}",
path: "app/services/hunyuan3d/vendor/Hunyuan3D-2.1/hy3dpaint/DifferentiableRenderer",
message: "bash compile_mesh_painter.sh"
}
},
{
when: "{{!exists('app/services/hunyuan3d/vendor/Hunyuan3D-2.1/hy3dpaint/ckpt/RealESRGAN_x4plus.pth')}}",
method: "fs.download",
params: {
url: "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth",
path: "app/services/hunyuan3d/vendor/Hunyuan3D-2.1/hy3dpaint/ckpt/RealESRGAN_x4plus.pth"
}
},
{
method: "fs.write",
params: {
path: "app/services/hunyuan3d/env/.maestro_hunyuan3d_v1.installed",
text: "ok"
}
},
{
method: "fs.write",
params: {
path: hunyuan3d2.marker,
text: "repository=" + hunyuan3d2.url + "\nrevision=" + hunyuan3d2.revision + "\n"
}
},
{
method: "fs.write",
params: {
path: hunyuan3d21.marker,
text: "repository=" + hunyuan3d21.url + "\nrevision=" + hunyuan3d21.revision + "\n"
}
},
// MiniMax H3 runs in an isolated ComfyUI checkout because its quantized
// ConvRot stack must not change Maestro/WanGP's Python dependencies.
// Mirrors system/examples/comfy/install.js: clone, isolated env, then uv.
{
when: "{{!exists('app/services/minimax_h3/vendor/ComfyUI/main.py')}}",
method: "shell.run",
params: {
message: [
"git clone --depth 1 --branch minimax_h3 https://github.com/kijai/ComfyUI app/services/minimax_h3/vendor/ComfyUI",
"git -C app/services/minimax_h3/vendor/ComfyUI fetch --depth 1 origin e2ab36d933356bc8cd6ecb39c655fe8be75af4e5",
"git -C app/services/minimax_h3/vendor/ComfyUI checkout e2ab36d933356bc8cd6ecb39c655fe8be75af4e5"
]
}
},
{
method: "shell.run",
params: {
conda: { path: "app/services/minimax_h3/env", python: "3.11" },
message: [
"uv pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu130",
"uv pip install -r app/services/minimax_h3/vendor/ComfyUI/requirements.txt"
]
}
},
{
method: "fs.write",
params: {
path: "app/services/minimax_h3/env/.maestro_minimax_h3_v2.installed",
text: "e2ab36d933356bc8cd6ecb39c655fe8be75af4e5 torch-2.10.0-cu130"
}
},
// Fetch the seed-vc voice-conversion component (GPL-3.0). It lives in
// its own repository and is cloned into place at install time instead
// of being tracked in this repo, so the GPL-licensed tree keeps its own
// license and distribution channel. Pinned to a tag for reproducible
// installs — bump the tag here AND in update.js when shipping a new
// component version.
{
when: "{{!exists('app/postprocessing/seedvc/__init__.py')}}",
method: "shell.run",
params: {
message: "git clone --depth 1 --branch v1.0.0 https://github.com/Blizaine/maestro-seedvc app/postprocessing/seedvc"
}
},
{
when: "{{exists('ui/package.json')}}",
method: "shell.run",
params: {
path: "ui",
message: [
"npm ci",
"npm run build"
]
}
},
// SAM 3.1 segmentation service (used by experimental Inpaint mode)
// is intentionally NOT installed here. It adds ~5+ minutes to a
// fresh install (separate Python 3.12 conda env, torch wheels,
// SAM 3 source, etc.) but is only needed for the inpaint feature
// which most users won't touch — and which is gated behind the
// experimental flag in Settings → Services anyway. Users who want
// it can run "Install Inpaint Support" from the Pinokio menu when
// they're ready, which fires sam_install.js.
{
method: 'input',
params: {
title: 'Installation completed',
description: 'Click "Start" to get started'
}
}
]
}