Skip to content

Commit 54b7c5b

Browse files
committed
Advanced Checkpoint and Advanced DisTorch2 Checkpoint loaders (#95), Fix CLiP loading device when MultGPU or DisTorch2 is invoked.
Advanced Checkpoint Loaders allow users to map each of the elements of the checkpoint to a different device, or in the case of DisTorch2, shard the UNet and CLiP .safetensors arbitrarily whilst ensuring actual computation remains on selected `compute` device. Added example workflow for standard and DisTorch2 MultGPU checkpoint loaders.
1 parent 0b1511e commit 54b7c5b

4 files changed

Lines changed: 1134 additions & 1 deletion

File tree

Lines changed: 396 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,396 @@
1+
{
2+
"id": "d21a2457-c2bf-4733-b2e9-42352b1dd20d",
3+
"revision": 0,
4+
"last_node_id": 11,
5+
"last_link_id": 17,
6+
"nodes": [
7+
{
8+
"id": 7,
9+
"type": "CLIPTextEncode",
10+
"pos": [
11+
413,
12+
389
13+
],
14+
"size": [
15+
425.27801513671875,
16+
180.6060791015625
17+
],
18+
"flags": {},
19+
"order": 3,
20+
"mode": 0,
21+
"inputs": [
22+
{
23+
"name": "clip",
24+
"type": "CLIP",
25+
"link": 16
26+
}
27+
],
28+
"outputs": [
29+
{
30+
"name": "CONDITIONING",
31+
"type": "CONDITIONING",
32+
"slot_index": 0,
33+
"links": [
34+
6
35+
]
36+
}
37+
],
38+
"properties": {
39+
"Node name for S&R": "CLIPTextEncode"
40+
},
41+
"widgets_values": [
42+
"text, watermark"
43+
]
44+
},
45+
{
46+
"id": 3,
47+
"type": "KSampler",
48+
"pos": [
49+
863,
50+
186
51+
],
52+
"size": [
53+
315,
54+
474
55+
],
56+
"flags": {},
57+
"order": 4,
58+
"mode": 0,
59+
"inputs": [
60+
{
61+
"name": "model",
62+
"type": "MODEL",
63+
"link": 14
64+
},
65+
{
66+
"name": "positive",
67+
"type": "CONDITIONING",
68+
"link": 4
69+
},
70+
{
71+
"name": "negative",
72+
"type": "CONDITIONING",
73+
"link": 6
74+
},
75+
{
76+
"name": "latent_image",
77+
"type": "LATENT",
78+
"link": 2
79+
}
80+
],
81+
"outputs": [
82+
{
83+
"name": "LATENT",
84+
"type": "LATENT",
85+
"slot_index": 0,
86+
"links": [
87+
7
88+
]
89+
}
90+
],
91+
"properties": {
92+
"Node name for S&R": "KSampler"
93+
},
94+
"widgets_values": [
95+
262971817904402,
96+
"randomize",
97+
20,
98+
8,
99+
"euler",
100+
"normal",
101+
1
102+
]
103+
},
104+
{
105+
"id": 8,
106+
"type": "VAEDecode",
107+
"pos": [
108+
1209,
109+
188
110+
],
111+
"size": [
112+
210,
113+
46
114+
],
115+
"flags": {},
116+
"order": 5,
117+
"mode": 0,
118+
"inputs": [
119+
{
120+
"name": "samples",
121+
"type": "LATENT",
122+
"link": 7
123+
},
124+
{
125+
"name": "vae",
126+
"type": "VAE",
127+
"link": 17
128+
}
129+
],
130+
"outputs": [
131+
{
132+
"name": "IMAGE",
133+
"type": "IMAGE",
134+
"slot_index": 0,
135+
"links": [
136+
9
137+
]
138+
}
139+
],
140+
"properties": {
141+
"Node name for S&R": "VAEDecode"
142+
},
143+
"widgets_values": []
144+
},
145+
{
146+
"id": 9,
147+
"type": "SaveImage",
148+
"pos": [
149+
1451,
150+
189
151+
],
152+
"size": [
153+
797.607666015625,
154+
781.645263671875
155+
],
156+
"flags": {},
157+
"order": 6,
158+
"mode": 0,
159+
"inputs": [
160+
{
161+
"name": "images",
162+
"type": "IMAGE",
163+
"link": 9
164+
}
165+
],
166+
"outputs": [],
167+
"properties": {
168+
"Node name for S&R": "SaveImage"
169+
},
170+
"widgets_values": [
171+
"ComfyUI"
172+
]
173+
},
174+
{
175+
"id": 5,
176+
"type": "EmptyLatentImage",
177+
"pos": [
178+
473,
179+
609
180+
],
181+
"size": [
182+
315,
183+
106
184+
],
185+
"flags": {},
186+
"order": 0,
187+
"mode": 0,
188+
"inputs": [],
189+
"outputs": [
190+
{
191+
"name": "LATENT",
192+
"type": "LATENT",
193+
"slot_index": 0,
194+
"links": [
195+
2
196+
]
197+
}
198+
],
199+
"properties": {
200+
"Node name for S&R": "EmptyLatentImage"
201+
},
202+
"widgets_values": [
203+
1024,
204+
1024,
205+
1
206+
]
207+
},
208+
{
209+
"id": 6,
210+
"type": "CLIPTextEncode",
211+
"pos": [
212+
415,
213+
186
214+
],
215+
"size": [
216+
422.84503173828125,
217+
164.31304931640625
218+
],
219+
"flags": {},
220+
"order": 2,
221+
"mode": 0,
222+
"inputs": [
223+
{
224+
"name": "clip",
225+
"type": "CLIP",
226+
"link": 15
227+
}
228+
],
229+
"outputs": [
230+
{
231+
"name": "CONDITIONING",
232+
"type": "CONDITIONING",
233+
"slot_index": 0,
234+
"links": [
235+
4
236+
]
237+
}
238+
],
239+
"properties": {
240+
"Node name for S&R": "CLIPTextEncode"
241+
},
242+
"widgets_values": [
243+
"A towering technological monolith in a cyberpunk cityscape at night, with \"DisTorch 2\" emblazoned across its surface in massive neon blue-green mixed with purple letters that illuminate the surrounding buildings. The text occupies the central third of the frame, crafted from glowing plasma tubes and crackling energy. Rain-slicked streets below reflect the brilliant signage, while holographic advertisements and flying vehicles populate the background. Moody atmospheric lighting, heavy contrast, photorealistic textures, cinematic color grading. \"Now for .safetensors!\" in same stying but smaller font as a splash overlay in the right-hand corner of the image "
244+
]
245+
},
246+
{
247+
"id": 11,
248+
"type": "CheckpointLoaderAdvancedDisTorch2MultiGPU",
249+
"pos": [
250+
-135.86851501464844,
251+
203.48403930664062
252+
],
253+
"size": [
254+
397.9400329589844,
255+
338
256+
],
257+
"flags": {},
258+
"order": 1,
259+
"mode": 0,
260+
"inputs": [],
261+
"outputs": [
262+
{
263+
"name": "MODEL",
264+
"type": "MODEL",
265+
"links": [
266+
14
267+
]
268+
},
269+
{
270+
"name": "CLIP",
271+
"type": "CLIP",
272+
"links": [
273+
15,
274+
16
275+
]
276+
},
277+
{
278+
"name": "VAE",
279+
"type": "VAE",
280+
"links": [
281+
17
282+
]
283+
}
284+
],
285+
"properties": {
286+
"Node name for S&R": "CheckpointLoaderAdvancedDisTorch2MultiGPU"
287+
},
288+
"widgets_values": [
289+
"Juggernaut-XL_v9_RunDiffusionPhoto_v2.safetensors",
290+
"cuda:0",
291+
1.1,
292+
"cpu",
293+
"cuda:1",
294+
2,
295+
"cpu",
296+
"cuda:1",
297+
"",
298+
"",
299+
true
300+
],
301+
"color": "#233",
302+
"bgcolor": "#355"
303+
}
304+
],
305+
"links": [
306+
[
307+
2,
308+
5,
309+
0,
310+
3,
311+
3,
312+
"LATENT"
313+
],
314+
[
315+
4,
316+
6,
317+
0,
318+
3,
319+
1,
320+
"CONDITIONING"
321+
],
322+
[
323+
6,
324+
7,
325+
0,
326+
3,
327+
2,
328+
"CONDITIONING"
329+
],
330+
[
331+
7,
332+
3,
333+
0,
334+
8,
335+
0,
336+
"LATENT"
337+
],
338+
[
339+
9,
340+
8,
341+
0,
342+
9,
343+
0,
344+
"IMAGE"
345+
],
346+
[
347+
14,
348+
11,
349+
0,
350+
3,
351+
0,
352+
"MODEL"
353+
],
354+
[
355+
15,
356+
11,
357+
1,
358+
6,
359+
0,
360+
"CLIP"
361+
],
362+
[
363+
16,
364+
11,
365+
1,
366+
7,
367+
0,
368+
"CLIP"
369+
],
370+
[
371+
17,
372+
11,
373+
2,
374+
8,
375+
1,
376+
"VAE"
377+
]
378+
],
379+
"groups": [],
380+
"config": {},
381+
"extra": {
382+
"ds": {
383+
"scale": 0.6593771753936349,
384+
"offset": [
385+
1007.5875606954307,
386+
245.85267454738732
387+
]
388+
},
389+
"frontendVersion": "1.25.11",
390+
"VHS_latentpreview": false,
391+
"VHS_latentpreviewrate": 0,
392+
"VHS_MetadataImage": true,
393+
"VHS_KeepIntermediate": true
394+
},
395+
"version": 0.4
396+
}
File renamed without changes.

0 commit comments

Comments
 (0)