fiojanea commited on
Commit
83e44ea
·
verified ·
1 Parent(s): 99d9472

Upload Vast-ComfyUI-wan-2.2.-I2V.sh

Browse files
Files changed (1) hide show
  1. Vast-ComfyUI-wan-2.2.-I2V.sh +462 -0
Vast-ComfyUI-wan-2.2.-I2V.sh ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ #!/bin/bash
4
+
5
+ source /venv/main/bin/activate
6
+ COMFYUI_DIR=${WORKSPACE}/ComfyUI
7
+
8
+ # Packages are installed after nodes so we can fix them...
9
+
10
+ APT_PACKAGES=(
11
+ #"package-1"
12
+ #"package-2"
13
+ )
14
+
15
+ PIP_PACKAGES=(
16
+ #"package-1"
17
+ #"package-2"
18
+ )
19
+
20
+ NODES=(
21
+ "https://github.com/ltdrdata/ComfyUI-Manager"
22
+ "https://github.com/cubiq/ComfyUI_essentials"
23
+ "https://github.com/ShmuelRonen/ComfyUI-WanVideoKsampler"
24
+ "https://github.com/kijai/ComfyUI-WanVideoWrapper"
25
+ "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"
26
+ "https://github.com/DoctorDiffusion/ComfyUI-MediaMixer"
27
+ "https://github.com/rgthree/rgthree-comfy"
28
+ "https://github.com/GTSuya-Studio/ComfyUI-Gtsuya-Nodes"
29
+ "https://github.com/JaredTherriault/ComfyUI-JNodes"
30
+ "https://github.com/heshengtao/comfyui_LLM_party"
31
+ "https://github.com/kijai/ComfyUI-KJNodes"
32
+ "https://github.com/TinyTerra/ComfyUI_tinyterraNodes"
33
+ "https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92"
34
+ "https://github.com/bash-j/mikey_nodes"
35
+ "https://github.com/crystian/comfyui-crystools"
36
+ "https://github.com/yolain/ComfyUI-Easy-Use"
37
+ "https://github.com/Fannovel16/ComfyUI-Frame-Interpolation"
38
+ "https://github.com/LAOGOU-666/Comfyui-Memory_Cleanup"
39
+ "https://github.com/evanspearman/ComfyMath"
40
+
41
+
42
+ )
43
+
44
+
45
+ WORKFLOWS=(
46
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.1_i2v_720P.json"
47
+
48
+ )
49
+
50
+ CHECKPOINT_MODELS=(
51
+ #"https://civitai.com/api/download/models/798204?type=Model&format=SafeTensor&size=full&fp=fp16"
52
+ #"https://huggingface.co/Kijai/HunyuanVideo_comfy/resolve/main/hunyuan_video_FastVideo_720_fp8_e4m3fn.safetensors"
53
+ #
54
+
55
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan_2.1_vae.safetensors"
56
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/umt5_xxl_fp16.safetensors"
57
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/Phantom-Wan-14B_fp16.safetensors"
58
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.1_i2v_720p_14B_bf16.safetensors"
59
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/clip_vision_h.safetensors"
60
+ )
61
+
62
+ UNET_MODELS=(
63
+ )
64
+
65
+ LORA_MODELS=(
66
+
67
+ # WAN accelerators ------------------------------------------------------------------------------------
68
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/high_noise_model.safetensors"
69
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/low_noise_model.safetensors"
70
+
71
+ # WAN general ------------------------------------------------------------------------------------------
72
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/NSFW-22-H-e8.safetensors"
73
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/NSFW-22-L-e8.safetensors"
74
+
75
+ # WAN Body modifications ------------------------------------------------------------------------------
76
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/genitals_helper_v1.0_e219.safetensors"
77
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/small_breasts_v1.0_wan14b_epoch050.safetensors"
78
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan_Breast_Helper_Hearmeman.safetensors"
79
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan_Pussy_LoRA_Hearmeman.safetensors"
80
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/TorpedoTits_wan22_e20_low.safetensors"
81
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flat_chest_V1..safetensors"
82
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/SaggyTits_wan22_e25_low.safetensors"
83
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/BBFWv1.safetensors"
84
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-T2V-Femaled-Vaginus-High-v1.safetensors"
85
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-T2V-Femaled-Vaginus-Low-V1.safetensors"
86
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/T2V_D-Cups-14B.safetensors"
87
+
88
+ # WAN Kissing -----------------------------------------------------------------------------------------
89
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-T2V-Kissing-HIGH-14B.safetensors"
90
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-T2V-Kissing-LOW-14B.safetensors"
91
+
92
+ # WAN Undressing --------------------------------------------------------------------------------------
93
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/woman_undressing_v1.0_wan14b_epoch048.safetensors"
94
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/str1p_v1.safetensors"
95
+
96
+ # WAN Penis -------------------------------------------------------------------------------------------
97
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/erect_penis_epoch_80.safetensors"
98
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/dicks_epoch_100.safetensors"
99
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.1-i2v-480p-penis-arousal-v1.0.safetensors"
100
+
101
+ # WAN Cumshot -----------------------------------------------------------------------------------------
102
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_highnoise_cumshot_v.1.0.safetensors"
103
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_lownoise_cumshot_v1.0.safetensors"
104
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan-thiccum-v3.safetensors"
105
+
106
+ # WAN Insertion ----------------------------------------------------------------------------------------
107
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2-i2v-high-oral-insertion-v1.0.safetensors"
108
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2-i2v-low-oral-insertion-v1.0.safetensors"
109
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2-i2v-high-pov-insertion-v1.0.safetensors"
110
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2-i2v-low-pov-insertion-v1.0.safetensors"
111
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.1-i2v-480p-anal-insertion-v1.0.safetensors"
112
+
113
+ # WAN Blowjob ------------------------------------------------------------------------------------------
114
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/jfj-deepthroat-W22-I2V-HN.safetensors"
115
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/jfj-deepthroat-W22-I2V-LN.safetensors"
116
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-I2V-Blowjob-HIGH-14B.safetensors"
117
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-I2V-Blowjob-LOW-14B.safetensors"
118
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/DR34MJOB_I2V_14b_HighNoise.safetensors"
119
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/DR34MJOB_I2V_14b_LowNoise.safetensors"
120
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2_2_tongue_job_exp_high_noise.safetensors"
121
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2_2_tongue_job_exp_low_noise.safetensors"
122
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/FF-v3-high-120.safetensors"
123
+
124
+ # WAN Masturbating, fingering, posing --------------------------------------------------------------------
125
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/WAN-2.2-I2V-BreastPlay-HIGH-v2.safetensors"
126
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/WAN-2.2-I2V-BreastPlay-LOW-v2.safetensors"
127
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/W22_NSFW_Posing_Nude_i2v_HN_v1.safetensors"
128
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/W22_NSFW_Posing_Nude_i2v_LN_v1.safetensors"
129
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/I2V_-_Dildo_Masturbation_-_14B.safetensors"
130
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Sensual_fingering_v1_high_noise.safetensors"
131
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Sensual_fingering_v1_low_noise.safetensors"
132
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Beingfingered.safetensors"
133
+
134
+ # WAN Fucking -------------------------------------------------------------------------------------------
135
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan_pov_missionary_i2v_v1.1.safetensors"
136
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/analMissionary_1.1_i2v_e100.safetensors"
137
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_i2v_highnoise_pov_missionary_v1.0.safetensors"
138
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_i2v_lownoise_pov_missionary_v1.0.safetensors"
139
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-T2V-DoggyStyle-HIGH-14B.safetensors"
140
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-T2V-DoggyStyle-LOW-14B.safetensors"
141
+
142
+
143
+
144
+ # WAN Spanking, slapping --------------------------------------------------------------------------------
145
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/spanking_for_wan_v1_e128.safetensors"
146
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Whippingfurry.safetensors"
147
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/slap.safetensors"
148
+
149
+ # WAN Orgasm --------------------------------------------------------------------------------------------
150
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-I2V-Orgasm-HIGH-14B.safetensors"
151
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Wan2.2-I2V-Orgasm-LOW-14B.safetensors"
152
+
153
+ # WAN Spreading -----------------------------------------------------------------------------------------
154
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/pussy_spread_i2v_480p.safetensors"
155
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/ass_spread_i2v_480p_v02.safetensors"
156
+
157
+ # WAN Handjob -------------------------------------------------------------------------------------------
158
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Handjob-wan-e38.safetensors"
159
+
160
+ # WAN Lesbian -------------------------------------------------------------------------------------------
161
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/T2V_lesbian-cunnilingus_v2-14b.safetensors"
162
+
163
+ # WAN Misc -----------------------------------------------------------------------------------------------
164
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/crying-high.safetensors"
165
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Hit_the_face.safetensors"
166
+
167
+ # WAN Misc (NOT IN USE) ----------------------------------------------------------------------------------
168
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/WAN-facefuck-epoch110_fast_speed_full_insertion_man_has_sex_with_womans_mouth.safetensors"
169
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/W_NSFW_Posing_Nude_t2v_14b_v1.safetensors"
170
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/360_epoch20.safetensors"
171
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/P007-Catwalk-i2v-v10-000008_converted.safetensors"
172
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/photoshooting.safetensors"
173
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/DR34M1SH_I2V_V1.420.safetensors"
174
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/layuan_zoom-out.safetensors"
175
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/front_doggy_plow_v1_1_wan.safetensors"
176
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/I2V-Doggystyle_From_Front-720p.safetensors"
177
+
178
+ # WAN charachters ------------------------------------------------------------------------------------------------
179
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/dak0ta.safetensors"
180
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/r11kka.safetensors"
181
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/r1tva.safetensors"
182
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/ann11na_ai.safetensors"
183
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/m3rja.safetensors"
184
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/m5w.safetensors"
185
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/p1nja.safetensors"
186
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/r11kka2.safetensors"
187
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/m3rja2.safetensors"
188
+
189
+ # FLUX -----------------------------------------------------------------------------------------------------------
190
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux_NSFW_lora.safetensors"
191
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/JD3s_Nudify_Kontext.safetensors"
192
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/skin_texture_style_v5.safetensors"
193
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/skin_tone_style_v2-step00001500.safetensors"
194
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/nsfw_flux_lora_v1.safetensors"
195
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/undressing_flux_v3.safetensors"
196
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/OnOffFlux4-9.safetensors"
197
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/breast-size2.safetensors"
198
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-Bumpy_nipples.safetensors"
199
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-Conical_nipples.safetensors"
200
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-Perky_nipples.safetensors"
201
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-Small_Nipples.safetensors"
202
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-Wide_nipples.safetensors"
203
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-puffy_nipples.safetensors"
204
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/FLUX_FD-BreastMegaPack-R16.safetensors"
205
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-Realistic_Pussy.safetensors"
206
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/Flux-realistic_HDR_v1.safetensors"
207
+
208
+
209
+ )
210
+
211
+ VAE_MODELS=(
212
+ )
213
+
214
+ ESRGAN_MODELS=(
215
+ )
216
+
217
+ CONTROLNET_MODELS=(
218
+ )
219
+
220
+ ### DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING ###
221
+
222
+ function provisioning_start() {
223
+ provisioning_print_header
224
+ provisioning_get_apt_packages
225
+ provisioning_get_nodes
226
+ provisioning_get_pip_packages
227
+
228
+ # Download to specific directories
229
+ provisioning_get_files "${COMFYUI_DIR}/models/vae" \
230
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan_2.1_vae.safetensors"
231
+
232
+ provisioning_get_files "${COMFYUI_DIR}/models/vae" \
233
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/ae.safetensors"
234
+
235
+ provisioning_get_files "${COMFYUI_DIR}/models/clip" \
236
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/clip_l.safetensors"
237
+
238
+ provisioning_get_files "${COMFYUI_DIR}/models/clip" \
239
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/t5xxl_fp16.safetensors"
240
+
241
+ provisioning_get_files "${COMFYUI_DIR}/models/clip_vision" \
242
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/clip_vision_h.safetensors"
243
+
244
+ provisioning_get_files "${COMFYUI_DIR}/models/clip_vision" \
245
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/open_clip_model.safetensors"
246
+
247
+ provisioning_get_files "${COMFYUI_DIR}/models/upscale_models" \
248
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/RealESRGAN_x4plus.pth"
249
+
250
+ provisioning_get_files "${COMFYUI_DIR}/models/upscale_models" \
251
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/RealESRGAN_x2plus.pth"
252
+
253
+ provisioning_get_files "${COMFYUI_DIR}/models/diffusion_models" \
254
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors"
255
+
256
+ provisioning_get_files "${COMFYUI_DIR}/models/diffusion_models" \
257
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors"
258
+
259
+ provisioning_get_files "${COMFYUI_DIR}/models/diffusion_models" \
260
+ # "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors"
261
+
262
+ provisioning_get_files "${COMFYUI_DIR}/models/diffusion_models" \
263
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors"
264
+
265
+ provisioning_get_files "${COMFYUI_DIR}/models/diffusion_models" \
266
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/flux1-kontext-dev.safetensors"
267
+
268
+ provisioning_get_files "${COMFYUI_DIR}/models/diffusion_models" \
269
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/flux1-fill-dev.safetensors"
270
+
271
+
272
+
273
+
274
+ provisioning_get_files "${COMFYUI_DIR}/models/text_encoders" \
275
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/umt5_xxl_fp8_e4m3fn_scaled.safetensors"
276
+ #"https://huggingface.co/fiojanea/Esan_testi/resolve/main/umt5_xxl_fp16.safetensors"
277
+
278
+ provisioning_get_files "${COMFYUI_DIR}/models/text_encoders" \
279
+ "https://huggingface.co/fiojanea/Esan_testi/resolve/main/umt5_xxl_fp16.safetensors"
280
+
281
+ # Other model categories
282
+ provisioning_get_files "${COMFYUI_DIR}/models/checkpoints" "${CHECKPOINT_MODELS[@]}"
283
+ provisioning_get_files "${COMFYUI_DIR}/models/loras" "${LORA_MODELS[@]}"
284
+
285
+ provisioning_print_end
286
+ }
287
+
288
+
289
+ function provisioning_get_apt_packages() {
290
+ if [[ -n $APT_PACKAGES ]]; then
291
+ sudo $APT_INSTALL ${APT_PACKAGES[@]}
292
+ fi
293
+ }
294
+
295
+ function provisioning_get_pip_packages() {
296
+ if [[ -n $PIP_PACKAGES ]]; then
297
+ pip install --no-cache-dir ${PIP_PACKAGES[@]}
298
+ fi
299
+ }
300
+
301
+ function provisioning_get_nodes() {
302
+ for repo in "${NODES[@]}"; do
303
+ dir="${repo##*/}"
304
+ path="${COMFYUI_DIR}/custom_nodes/${dir}"
305
+ requirements="${path}/requirements.txt"
306
+
307
+ printf "Cloning or updating node: %s\n" "${repo}"
308
+ rm -rf "${path}" # Ensure fresh clone
309
+ git clone "${repo}" "${path}" --recursive
310
+
311
+ if [[ -e "$requirements" ]]; then
312
+ echo "Installing requirements for ${dir}..."
313
+ pip install --no-cache-dir -r "$requirements"
314
+ fi
315
+ done
316
+ }
317
+
318
+ function provisioning_get_files() {
319
+ if [[ -z $2 ]]; then return 1; fi
320
+
321
+ dir="$1"
322
+ mkdir -p "$dir"
323
+ shift
324
+ arr=("$@")
325
+ printf "Downloading %s model(s) to %s...\n" "${#arr[@]}" "$dir"
326
+ for url in "${arr[@]}"; do
327
+ printf "Downloading: %s\n" "${url}"
328
+ provisioning_download "${url}" "${dir}"
329
+ printf "\n"
330
+ done
331
+ }
332
+
333
+ function provisioning_print_header() {
334
+ printf "\n##############################################\n# #\n# Provisioning container #\n# #\n# This will take some time #\n# #\n# Your container will be ready on completion #\n# #\n##############################################\n\n"
335
+ }
336
+
337
+ function provisioning_print_end() {
338
+ printf "\nProvisioning complete: Application will start now\n\n"
339
+ }
340
+
341
+ function provisioning_has_valid_hf_token() {
342
+ [[ -n "$HF_TOKEN" ]] || return 1
343
+ url="https://huggingface.co/api/whoami-v2"
344
+
345
+ response=$(curl -o /dev/null -s -w "%{http_code}" -X GET "$url" \
346
+ -H "Authorization: Bearer $HF_TOKEN" \
347
+ -H "Content-Type: application/json")
348
+
349
+ # Check if the token is valid
350
+ if [ "$response" -eq 200 ]; then
351
+ return 0
352
+ else
353
+ return 1
354
+ fi
355
+ }
356
+
357
+ function provisioning_has_valid_civitai_token() {
358
+ [[ -n "$CIVITAI_TOKEN" ]] || return 1
359
+ url="https://civitai.com/api/v1/models?hidden=1&limit=1"
360
+
361
+ response=$(curl -o /dev/null -s -w "%{http_code}" -X GET "$url" \
362
+ -H "Authorization: Bearer $CIVITAI_TOKEN" \
363
+ -H "Content-Type: application/json")
364
+
365
+ # Check if the token is valid
366
+ if [ "$response" -eq 200 ]; then
367
+ return 0
368
+ else
369
+ return 1
370
+ fi
371
+ }
372
+
373
+ # Download from $1 URL to $2 file path
374
+ function provisioning_download() {
375
+ if [[ -n $HF_TOKEN && $1 =~ ^https://([a-zA-Z0-9_-]+\.)?huggingface\.co(/|$|\?) ]]; then
376
+ auth_token="$HF_TOKEN"
377
+ elif
378
+ [[ -n $CIVITAI_TOKEN && $1 =~ ^https://([a-zA-Z0-9_-]+\.)?civitai\.com(/|$|\?) ]]; then
379
+ auth_token="$CIVITAI_TOKEN"
380
+ fi
381
+ if [[ -n $auth_token ]];then
382
+ wget --header="Authorization: Bearer $auth_token" -qnc --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "$1"
383
+ else
384
+ wget -qnc --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "$1"
385
+ fi
386
+ }
387
+
388
+ # Allow user to disable provisioning if they started with a script they didn't want
389
+ if [[ ! -f /.noprovisioning ]]; then
390
+ provisioning_start
391
+ fi
392
+
393
+ # ----------------- CUSTOM NODE AND PROMPT FOLDER SETUP -----------------
394
+
395
+ # 1. Ensure prompt folder exists
396
+ mkdir -p /workspace/prompts
397
+
398
+ # 2. Add custom PromptFilePicker node
399
+ cat << 'EOF' > /workspace/ComfyUI/custom_nodes/custom_prompt_picker.py
400
+ import os
401
+
402
+ PROMPT_DIR = "/workspace/prompts"
403
+
404
+ class PromptFilePicker:
405
+ @classmethod
406
+ def INPUT_TYPES(cls):
407
+ try:
408
+ files = [
409
+ f for f in os.listdir(PROMPT_DIR)
410
+ if f.endswith(".txt") and os.path.isfile(os.path.join(PROMPT_DIR, f))
411
+ ]
412
+ except Exception as e:
413
+ files = ["[ERROR: " + str(e) + "]"]
414
+
415
+ files.sort()
416
+ return {
417
+ "required": {
418
+ "prompt_file": (
419
+ files,
420
+ {"default": files[0]} if files else {}
421
+ )
422
+ }
423
+ }
424
+
425
+ RETURN_TYPES = ("STRING",)
426
+ RETURN_NAMES = ("prompt_text",)
427
+ FUNCTION = "load_prompt"
428
+ CATEGORY = "Custom/Prompt"
429
+
430
+ def load_prompt(self, prompt_file):
431
+ path = os.path.join(PROMPT_DIR, prompt_file)
432
+ with open(path, "r", encoding="utf-8") as f:
433
+ content = f.read()
434
+ return (content,)
435
+
436
+
437
+ NODE_CLASS_MAPPINGS = {
438
+ "PromptFilePicker": PromptFilePicker
439
+ }
440
+
441
+ NODE_DISPLAY_NAME_MAPPINGS = {
442
+ "PromptFilePicker": "Prompt File Picker"
443
+ }
444
+ EOF
445
+
446
+
447
+ # ----------------- PATCH START -----------------
448
+ # Force ComfyUI Manager to run with --allow-custom-nodes
449
+ echo '#!/bin/bash
450
+ source /venv/main/bin/activate
451
+ cd /workspace/ComfyUI
452
+ python3 manager.py --allow-custom-nodes' > /workspace/start-comfy-manager.sh
453
+
454
+ chmod +x /workspace/start-comfy-manager.sh
455
+
456
+ # Replace entrypoint.sh with a version that starts both manager and UI
457
+ echo '#!/bin/bash
458
+ /workspace/start-comfy-manager.sh & # Launch Manager in background
459
+ cd /workspace/ComfyUI
460
+ python3 main.py --disable-auto-launch --port 18188 --enable-cors-header' > /entrypoint.sh
461
+
462
+ chmod +x /entrypoint.sh