Support HiDream-I1-Dev and Lumina-Image-2.0, add cache_device option
This commit is contained in:
@@ -6,6 +6,12 @@ Timestep Embedding Aware Cache ([TeaCache](https://github.com/ali-vilab/TeaCache
|
||||
TeaCache has now been integrated into ComfyUI and is compatible with the ComfyUI native nodes. ComfyUI-TeaCache is easy to use, simply connect the TeaCache node with the ComfyUI native nodes for seamless usage.
|
||||
|
||||
## Updates
|
||||
- Jun 15 2025: ComfyUI-TeaCache supports HiDream-I1-Dev and Lumina-Image-2.0, adds cache_device option:
|
||||
- It can achieve a 1.5x lossless speedup and a 2x speedup without much visual quality degradation for HiDream-I1-Dev.
|
||||
- Support HiDream-I1-Dev LoRA!
|
||||
- It can achieve a 1.5x lossless speedup and a 1.7x speedup without much visual quality degradation for Lumina-Image-2.0.
|
||||
- Support Lumina-Image-2.0 LoRA!
|
||||
- Add cache_device option according to the feedback from [3](https://github.com/welltop-cn/ComfyUI-TeaCache/issues/74), [4](https://github.com/welltop-cn/ComfyUI-TeaCache/issues/104) and [5](https://github.com/welltop-cn/ComfyUI-TeaCache/issues/143).
|
||||
- May 22 2025: ComfyUI-TeaCache supports HiDream-I1-Full and redesigns TeaCache options:
|
||||
- It can achieve a 1.5x lossless speedup and a 2x speedup without much visual quality degradation.
|
||||
- Support HiDream-I1-Full LoRA!
|
||||
@@ -62,7 +68,9 @@ To use TeaCache node, simply add `TeaCache` node to your workflow after `Load Di
|
||||
|:----------------------------:|:-----------------:|:-----------------:|:-----------------:|:-----------------:|
|
||||
| FLUX | 0.4 | 0 | 1 | ~2x |
|
||||
| PuLID-FLUX | 0.4 | 0 | 1 | ~1.7x |
|
||||
| HiDream-I1-Dev | 1 | 0 | 1 | ~2x |
|
||||
| HiDream-I1-Full | 0.35 | 0.1 | 1 | ~2x |
|
||||
| Lumina-Image-2.0 | 0.38 | 0.2 | 1 | ~1.7x |
|
||||
| HunyuanVideo | 0.15 | 0 | 1 | ~1.9x |
|
||||
| LTX-Video | 0.06 | 0 | 1 | ~1.7x |
|
||||
| CogVideoX | 0.3 | 0 | 1 | ~2x |
|
||||
@@ -79,7 +87,9 @@ To use TeaCache node, simply add `TeaCache` node to your workflow after `Load Di
|
||||
|
||||
If the image/video after applying TeaCache is of low quality, please reduce rel_l1_thresh. I really don't recommend adjusting start_percent and end_percent unless you are an experienced engineer or creator.
|
||||
|
||||
The demo workflows ([flux](./examples/flux.json), [pulid_flux](./examples/pulid_flux.json), [hidream_i1_full](./examples/hidream_i1_full.json), [hunyuanvideo](./examples/hunyuanvideo.json), [ltx_video](./examples/ltx_video.json), [cogvideox](./examples/cogvideox.json), [wan2.1_t2v](./examples/wan2.1_t2v.json) and [wan2.1_i2v](./examples/wan2.1_i2v.json)) are placed in examples folder.
|
||||
If you have enough VRAM, please select `cuda` in the `cache_device` option, which can bring faster inference, but will increase VRAM slightly. If you have limited VRAM, please select `cpu` in the `cache_device` option, which do not increase VRAM, but will make inference slower slightly.
|
||||
|
||||
The demo workflows ([flux](./examples/flux.json), [pulid_flux](./examples/pulid_flux.json), [hidream_i1_dev](./examples/hidream_i1_dev.json), [hidream_i1_full](./examples/hidream_i1_full.json), [lumina_image_2](./examples/lumina_image_2.json), [hunyuanvideo](./examples/hunyuanvideo.json), [ltx_video](./examples/ltx_video.json), [cogvideox](./examples/cogvideox.json), [wan2.1_t2v](./examples/wan2.1_t2v.json) and [wan2.1_i2v](./examples/wan2.1_i2v.json)) are placed in examples folder.
|
||||
|
||||
### Compile Model
|
||||
To use Compile Model node, simply add `Compile Model` node to your workflow after `Load Diffusion Model` node or `TeaCache` node. Compile Model uses `torch.compile` to enhance the model performance by compiling model into more efficient intermediate representations (IRs). This compilation process leverages backend compilers to generate optimized code, which can significantly speed up inference. The compilation may take long time when you run the workflow at first, but once it is compiled, inference is extremely fast. The usage is shown below:
|
||||
@@ -92,9 +102,15 @@ To use Compile Model node, simply add `Compile Model` node to your workflow afte
|
||||
- <p><strong>PuLID-FLUX</strong></p>
|
||||

|
||||
|
||||
- <p><strong>HiDream-I1-Dev</strong></p>
|
||||

|
||||
|
||||
- <p><strong>HiDream-I1-Full</strong></p>
|
||||

|
||||
|
||||
- <p><strong>Lumina-Image-2.0</strong></p>
|
||||

|
||||
|
||||
- <p><strong>HunyuanVideo</strong></p>
|
||||
https://github.com/user-attachments/assets/b3aca64d-c2ae-440c-a362-f3a7b6c633e0
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 912 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 902 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 70 KiB |
+136
-135
@@ -83,65 +83,6 @@
|
||||
"color": "#233",
|
||||
"bgcolor": "#355"
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"type": "Note",
|
||||
"pos": [
|
||||
480,
|
||||
1344
|
||||
],
|
||||
"size": [
|
||||
314.99755859375,
|
||||
117.98363494873047
|
||||
],
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"properties": {
|
||||
"text": ""
|
||||
},
|
||||
"widgets_values": [
|
||||
"The reference sampling implementation auto adjusts the shift value based on the resolution, if you don't want this you can just bypass (CTRL-B) this ModelSamplingFlux node.\n"
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": "VAELoader",
|
||||
"pos": [
|
||||
48,
|
||||
432
|
||||
],
|
||||
"size": [
|
||||
311.81634521484375,
|
||||
60.429901123046875
|
||||
],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
12
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "VAELoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ae.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"type": "Note",
|
||||
@@ -154,7 +95,7 @@
|
||||
288
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
@@ -179,7 +120,7 @@
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -219,7 +160,7 @@
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -247,66 +188,6 @@
|
||||
"color": "#323",
|
||||
"bgcolor": "#535"
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"type": "ModelSamplingFlux",
|
||||
"pos": [
|
||||
480,
|
||||
1152
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
170
|
||||
],
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 125
|
||||
},
|
||||
{
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "width"
|
||||
},
|
||||
"link": 115
|
||||
},
|
||||
{
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "height"
|
||||
},
|
||||
"link": 114
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
54,
|
||||
55
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingFlux"
|
||||
},
|
||||
"widgets_values": [
|
||||
1.15,
|
||||
0.5,
|
||||
1024,
|
||||
1024
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"type": "BasicGuider",
|
||||
@@ -425,7 +306,7 @@
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -537,8 +418,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open holding a fancy black forest cake with candles on top in the kitchen of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere",
|
||||
true
|
||||
"cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open holding a fancy black forest cake with candles on top in the kitchen of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
@@ -670,7 +550,7 @@
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -695,6 +575,125 @@
|
||||
"color": "#223",
|
||||
"bgcolor": "#335"
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"type": "Note",
|
||||
"pos": [
|
||||
480,
|
||||
1375.0811767578125
|
||||
],
|
||||
"size": [
|
||||
314.99755859375,
|
||||
117.98363494873047
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"properties": {
|
||||
"text": ""
|
||||
},
|
||||
"widgets_values": [
|
||||
"The reference sampling implementation auto adjusts the shift value based on the resolution, if you don't want this you can just bypass (CTRL-B) this ModelSamplingFlux node.\n"
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"type": "ModelSamplingFlux",
|
||||
"pos": [
|
||||
480,
|
||||
1152
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
170
|
||||
],
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 125
|
||||
},
|
||||
{
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "width"
|
||||
},
|
||||
"link": 115
|
||||
},
|
||||
{
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "height"
|
||||
},
|
||||
"link": 114
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
54,
|
||||
55
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingFlux"
|
||||
},
|
||||
"widgets_values": [
|
||||
1.15,
|
||||
0.5,
|
||||
1024,
|
||||
1024
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": "VAELoader",
|
||||
"pos": [
|
||||
51.99299240112305,
|
||||
469.26788330078125
|
||||
],
|
||||
"size": [
|
||||
311.81634521484375,
|
||||
60.429901123046875
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
12
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "VAELoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ae.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"type": "RandomNoise",
|
||||
@@ -735,12 +734,12 @@
|
||||
"id": 41,
|
||||
"type": "TeaCache",
|
||||
"pos": [
|
||||
64.00762939453125,
|
||||
1143.05322265625
|
||||
66.22770690917969,
|
||||
1151.1937255859375
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
130
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
@@ -765,13 +764,15 @@
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"ver": "efe06530d43486df4431d4c7dea1873b738c647a",
|
||||
"Node name for S&R": "TeaCache"
|
||||
"Node name for S&R": "TeaCache",
|
||||
"aux_id": "welltop-cn/ComfyUI-TeaCache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"flux",
|
||||
0.4,
|
||||
0,
|
||||
1
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -935,10 +936,11 @@
|
||||
"ds": {
|
||||
"scale": 0.6830134553650714,
|
||||
"offset": [
|
||||
573.8598871415576,
|
||||
-251.04499921086108
|
||||
449.999999,
|
||||
-217.0498210000005
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"groupNodes": {},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.26",
|
||||
@@ -948,8 +950,7 @@
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true,
|
||||
"frontendVersion": "1.19.9"
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
@@ -0,0 +1,614 @@
|
||||
{
|
||||
"id": "01d66ae9-78be-4a8d-b737-24eee5e1d447",
|
||||
"revision": 0,
|
||||
"last_node_id": 74,
|
||||
"last_link_id": 165,
|
||||
"nodes": [
|
||||
{
|
||||
"id": 40,
|
||||
"type": "CLIPTextEncode",
|
||||
"pos": [
|
||||
530,
|
||||
260
|
||||
],
|
||||
"size": [
|
||||
432,
|
||||
192
|
||||
],
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"link": 112
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
114
|
||||
]
|
||||
}
|
||||
],
|
||||
"title": "Negative Prompt",
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"bad ugly jpeg artifacts"
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"type": "ModelSamplingSD3",
|
||||
"pos": [
|
||||
750,
|
||||
-90
|
||||
],
|
||||
"size": [
|
||||
210,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 165
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"links": [
|
||||
163
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingSD3"
|
||||
},
|
||||
"widgets_values": [
|
||||
6.000000000000001
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"type": "VAEDecode",
|
||||
"pos": [
|
||||
1340,
|
||||
-20
|
||||
],
|
||||
"size": [
|
||||
210,
|
||||
46
|
||||
],
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "samples",
|
||||
"type": "LATENT",
|
||||
"link": 160
|
||||
},
|
||||
{
|
||||
"name": "vae",
|
||||
"type": "VAE",
|
||||
"link": 107
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
51
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "VAEDecode"
|
||||
},
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 55,
|
||||
"type": "VAELoader",
|
||||
"pos": [
|
||||
1010,
|
||||
290
|
||||
],
|
||||
"size": [
|
||||
310,
|
||||
60
|
||||
],
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"links": [
|
||||
107
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "VAELoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ae.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"type": "QuadrupleCLIPLoader",
|
||||
"pos": [
|
||||
80,
|
||||
50
|
||||
],
|
||||
"size": [
|
||||
400,
|
||||
130
|
||||
],
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
111,
|
||||
112
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "QuadrupleCLIPLoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"clip_l_hidream.safetensors",
|
||||
"clip_g_hidream.safetensors",
|
||||
"t5xxl_fp8_e4m3fn_scaled.safetensors",
|
||||
"llama_3.1_8b_instruct_fp8_scaled.safetensors"
|
||||
],
|
||||
"color": "#223",
|
||||
"bgcolor": "#335"
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"type": "EmptySD3LatentImage",
|
||||
"pos": [
|
||||
620,
|
||||
340
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
106
|
||||
],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
100
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "EmptySD3LatentImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
1024,
|
||||
1024,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 72,
|
||||
"type": "MarkdownNote",
|
||||
"pos": [
|
||||
1010,
|
||||
430
|
||||
],
|
||||
"size": [
|
||||
300,
|
||||
450
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"title": "Sampling Settings",
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"## Official sampling settings\n\nProvided for reference, my workflows may have slightly different settings.\n\n### HiDream Full\n\n* hidream_i1_full_fp16.safetensors\n* shift: 3.0\n* steps: 50\n* sampler: uni_pc\n* scheduler: simple\n* cfg: 5.0\n\n### HiDream Dev\n\n* hidream_i1_dev_bf16.safetensors\n* shift: 6.0\n* steps: 28\n* sampler: lcm\n* scheduler: normal\n* cfg: 1.0 (no negative prompt)\n\n### HiDream Fast\n\n* hidream_i1_fast_bf16.safetensors\n* shift: 3.0\n* steps: 16\n* sampler: lcm\n* scheduler: normal\n* cfg: 1.0 (no negative prompt)\n"
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"type": "Note",
|
||||
"pos": [
|
||||
230,
|
||||
-220
|
||||
],
|
||||
"size": [
|
||||
250,
|
||||
88
|
||||
],
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"You can try changing the weight_dtype to fp8 if you are running out of memory."
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"type": "CLIPTextEncode",
|
||||
"pos": [
|
||||
530,
|
||||
20
|
||||
],
|
||||
"size": [
|
||||
432,
|
||||
192
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"link": 111
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
21
|
||||
]
|
||||
}
|
||||
],
|
||||
"title": "Positive Prompt",
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"anime girl with massive fennec ears and a big fluffy fox tail with long wavy blonde hair and blue eyes wearing a pink sweater a large oversized black winter coat and a long blue maxi skirt and large winter boots and a red scarf and large gloves sitting in a sled sledding fast down a snow mountain"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"type": "UNETLoader",
|
||||
"pos": [
|
||||
80,
|
||||
-90
|
||||
],
|
||||
"size": [
|
||||
400,
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"links": [
|
||||
164
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "UNETLoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"hidream_i1_dev_bf16.safetensors",
|
||||
"default"
|
||||
],
|
||||
"color": "#223",
|
||||
"bgcolor": "#335"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": "SaveImage",
|
||||
"pos": [
|
||||
1570,
|
||||
-20
|
||||
],
|
||||
"size": [
|
||||
966.615966796875,
|
||||
1025.3206787109375
|
||||
],
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 51
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "SaveImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"teacache"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": "KSampler",
|
||||
"pos": [
|
||||
1010,
|
||||
-20
|
||||
],
|
||||
"size": [
|
||||
310,
|
||||
262
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 163
|
||||
},
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 21
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 114
|
||||
},
|
||||
{
|
||||
"name": "latent_image",
|
||||
"type": "LATENT",
|
||||
"link": 100
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
160
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "KSampler"
|
||||
},
|
||||
"widgets_values": [
|
||||
88140548183682,
|
||||
"fixed",
|
||||
28,
|
||||
1,
|
||||
"euler",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 74,
|
||||
"type": "TeaCache",
|
||||
"pos": [
|
||||
496.1219177246094,
|
||||
-294.6657409667969
|
||||
],
|
||||
"size": [
|
||||
270,
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 164
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"links": [
|
||||
165
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"ver": "9db9e3393f674bd32cc1ce5ce271fb4994ef19c8",
|
||||
"Node name for S&R": "TeaCache",
|
||||
"aux_id": "welltop-cn/ComfyUI-TeaCache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"hidream_i1_dev",
|
||||
1.0000000000000002,
|
||||
0,
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
21,
|
||||
16,
|
||||
0,
|
||||
3,
|
||||
1,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
51,
|
||||
8,
|
||||
0,
|
||||
9,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
100,
|
||||
53,
|
||||
0,
|
||||
3,
|
||||
3,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
107,
|
||||
55,
|
||||
0,
|
||||
8,
|
||||
1,
|
||||
"VAE"
|
||||
],
|
||||
[
|
||||
111,
|
||||
54,
|
||||
0,
|
||||
16,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
112,
|
||||
54,
|
||||
0,
|
||||
40,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
114,
|
||||
40,
|
||||
0,
|
||||
3,
|
||||
2,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
160,
|
||||
3,
|
||||
0,
|
||||
8,
|
||||
0,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
163,
|
||||
70,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
"MODEL"
|
||||
],
|
||||
[
|
||||
164,
|
||||
69,
|
||||
0,
|
||||
74,
|
||||
0,
|
||||
"MODEL"
|
||||
],
|
||||
[
|
||||
165,
|
||||
74,
|
||||
0,
|
||||
70,
|
||||
0,
|
||||
"MODEL"
|
||||
]
|
||||
],
|
||||
"groups": [],
|
||||
"config": {},
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.6934334949441353,
|
||||
"offset": [
|
||||
141.0009287594034,
|
||||
316.78500858463906
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"ue_links": [],
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
@@ -282,11 +282,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"blurry",
|
||||
[
|
||||
false,
|
||||
true
|
||||
]
|
||||
"blurry"
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
@@ -329,76 +325,11 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"anime girl with massive fennec ears and a big fluffy fox tail with long wavy blonde hair and blue eyes wearing a pink sweater a large oversized black winter coat and a long blue maxi skirt and large winter boots and a red scarf and large gloves sitting in a sled sledding fast down a snow mountain",
|
||||
[
|
||||
false,
|
||||
true
|
||||
]
|
||||
"anime girl with massive fennec ears and a big fluffy fox tail with long wavy blonde hair and blue eyes wearing a pink sweater a large oversized black winter coat and a long blue maxi skirt and large winter boots and a red scarf and large gloves sitting in a sled sledding fast down a snow mountain"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": "KSampler",
|
||||
"pos": [
|
||||
1010,
|
||||
-20
|
||||
],
|
||||
"size": [
|
||||
310,
|
||||
262
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 163
|
||||
},
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 21
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 114
|
||||
},
|
||||
{
|
||||
"name": "latent_image",
|
||||
"type": "LATENT",
|
||||
"link": 100
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
160
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "KSampler"
|
||||
},
|
||||
"widgets_values": [
|
||||
221267224284097,
|
||||
"fixed",
|
||||
30,
|
||||
5,
|
||||
"euler",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"type": "UNETLoader",
|
||||
@@ -466,6 +397,67 @@
|
||||
"teacache"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": "KSampler",
|
||||
"pos": [
|
||||
1010,
|
||||
-20
|
||||
],
|
||||
"size": [
|
||||
310,
|
||||
262
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 163
|
||||
},
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 21
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 114
|
||||
},
|
||||
{
|
||||
"name": "latent_image",
|
||||
"type": "LATENT",
|
||||
"link": 100
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
160
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "KSampler"
|
||||
},
|
||||
"widgets_values": [
|
||||
221267224284100,
|
||||
"fixed",
|
||||
30,
|
||||
5,
|
||||
"euler",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"type": "TeaCache",
|
||||
@@ -475,7 +467,7 @@
|
||||
],
|
||||
"size": [
|
||||
270,
|
||||
130
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
@@ -505,7 +497,8 @@
|
||||
"hidream_i1_full",
|
||||
0.3500000000000001,
|
||||
0.10000000000000002,
|
||||
1
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -605,12 +598,12 @@
|
||||
"ds": {
|
||||
"scale": 0.7627768444385521,
|
||||
"offset": [
|
||||
-90.46285879116914,
|
||||
506.65245589442145
|
||||
-100.16782994584048,
|
||||
512.6944296637521
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"ue_links": [],
|
||||
"frontendVersion": "1.19.9",
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
|
||||
@@ -325,8 +325,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"anime style anime girl with massive fennec ears and one big fluffy tail, she has blonde hair long hair blue eyes wearing a pink sweater and a long blue skirt walking in a beautiful outdoor scenery with snow mountains in the background",
|
||||
true
|
||||
"anime style anime girl with massive fennec ears and one big fluffy tail, she has blonde hair long hair blue eyes wearing a pink sweater and a long blue skirt walking in a beautiful outdoor scenery with snow mountains in the background"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
@@ -715,7 +714,7 @@
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
130
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
@@ -739,15 +738,17 @@
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"aux_id": "welltop-cn/ComfyUI-TeaCache",
|
||||
"ver": "efe06530d43486df4431d4c7dea1873b738c647a",
|
||||
"Node name for S&R": "TeaCache"
|
||||
"Node name for S&R": "TeaCache",
|
||||
"cnr_id": "teacache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"hunyuan_video",
|
||||
0.15,
|
||||
0,
|
||||
1
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -899,6 +900,7 @@
|
||||
139.84374290591396
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"groupNodes": {},
|
||||
"workspace_info": {
|
||||
"id": "hSBfPb8KVVUoyCyWT3oHM"
|
||||
@@ -912,8 +914,7 @@
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true,
|
||||
"frontendVersion": "1.19.9"
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
+63
-63
@@ -87,8 +87,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"A woman with long brown hair and light skin smiles at another woman with long blonde hair. The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek. The camera angle is a close-up, focused on the woman with brown hair's face. The lighting is warm and natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage.",
|
||||
true
|
||||
"A woman with long brown hair and light skin smiles at another woman with long blonde hair. The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek. The camera angle is a close-up, focused on the woman with brown hair's face. The lighting is warm and natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage."
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
@@ -131,8 +130,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
||||
true
|
||||
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly"
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
@@ -231,59 +229,6 @@
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"type": "LTXVConditioning",
|
||||
"pos": [
|
||||
920,
|
||||
60
|
||||
],
|
||||
"size": [
|
||||
223.8660125732422,
|
||||
78
|
||||
],
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 169
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 170
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
166
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 1,
|
||||
"links": [
|
||||
167
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "LTXVConditioning"
|
||||
},
|
||||
"widgets_values": [
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"type": "CLIPLoader",
|
||||
@@ -571,7 +516,7 @@
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
130
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
@@ -594,15 +539,70 @@
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"aux_id": "welltop-cn/ComfyUI-TeaCache",
|
||||
"ver": "efe06530d43486df4431d4c7dea1873b738c647a",
|
||||
"Node name for S&R": "TeaCache"
|
||||
"Node name for S&R": "TeaCache",
|
||||
"cnr_id": "teacache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ltxv",
|
||||
0.06,
|
||||
0,
|
||||
1
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"type": "LTXVConditioning",
|
||||
"pos": [
|
||||
920,
|
||||
98
|
||||
],
|
||||
"size": [
|
||||
223.8660125732422,
|
||||
78
|
||||
],
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 169
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 170
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
166
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 1,
|
||||
"links": [
|
||||
167
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "LTXVConditioning"
|
||||
},
|
||||
"widgets_values": [
|
||||
25
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -738,6 +738,7 @@
|
||||
304.2520181935422
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.26",
|
||||
"ComfyUI-VideoHelperSuite": "124c913ccdd8a585734ea758c35fa1bab8499c99",
|
||||
@@ -747,8 +748,7 @@
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true,
|
||||
"frontendVersion": "1.19.9"
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
@@ -0,0 +1,548 @@
|
||||
{
|
||||
"id": "bf39dca7-a0d3-4eaf-b814-ad8b2b8c7bc8",
|
||||
"revision": 0,
|
||||
"last_node_id": 16,
|
||||
"last_link_id": 19,
|
||||
"nodes": [
|
||||
{
|
||||
"id": 8,
|
||||
"type": "VAEDecode",
|
||||
"pos": [
|
||||
1209,
|
||||
188
|
||||
],
|
||||
"size": [
|
||||
210,
|
||||
46
|
||||
],
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "samples",
|
||||
"type": "LATENT",
|
||||
"link": 14
|
||||
},
|
||||
{
|
||||
"name": "vae",
|
||||
"type": "VAE",
|
||||
"link": 8
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
16
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "VAEDecode"
|
||||
},
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"type": "EmptySD3LatentImage",
|
||||
"pos": [
|
||||
530,
|
||||
620
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
106
|
||||
],
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
17
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "EmptySD3LatentImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
1024,
|
||||
1024,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": "SaveImage",
|
||||
"pos": [
|
||||
1454.93896484375,
|
||||
190.9700164794922
|
||||
],
|
||||
"size": [
|
||||
976.0567626953125,
|
||||
1060.9766845703125
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 16
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "SaveImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ComfyUI"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": "ModelSamplingAuraFlow",
|
||||
"pos": [
|
||||
524.8006591796875,
|
||||
81.51603698730469
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 18
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
13
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "ModelSamplingAuraFlow"
|
||||
},
|
||||
"widgets_values": [
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"type": "CLIPTextEncode",
|
||||
"pos": [
|
||||
420,
|
||||
400
|
||||
],
|
||||
"size": [
|
||||
425.27801513671875,
|
||||
180.6060791015625
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"link": 5
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
6
|
||||
]
|
||||
}
|
||||
],
|
||||
"title": "CLIP Text Encode (Negative Prompt)",
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"blurry ugly bad"
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"type": "Note",
|
||||
"pos": [
|
||||
71.95149993896484,
|
||||
192.96051025390625
|
||||
],
|
||||
"size": [
|
||||
319.26513671875,
|
||||
197.89625549316406
|
||||
],
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"The \"You are an assistant... <Prompt Start> \" text before the actual prompt is the one used in the official example.\n\nThe reason it is exposed to the user like this is because the model still works if you modify or remove it."
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"type": "Note",
|
||||
"pos": [
|
||||
860,
|
||||
-50
|
||||
],
|
||||
"size": [
|
||||
310,
|
||||
180
|
||||
],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"The official way to sample this model is: shift 6 with 36 steps\n\nSampling it with lower steps works but you might have to lower the shift value to reduce the amount of artifacts.\n\nEx: 20 steps with shift 3 seems to not produce artifacts"
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"type": "CLIPTextEncode",
|
||||
"pos": [
|
||||
420,
|
||||
190
|
||||
],
|
||||
"size": [
|
||||
423.83001708984375,
|
||||
177.11770629882812
|
||||
],
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "clip",
|
||||
"type": "CLIP",
|
||||
"link": 3
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
4
|
||||
]
|
||||
}
|
||||
],
|
||||
"title": "CLIP Text Encode (Positive Prompt)",
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"You are an assistant designed to generate superior images with the superior degree of image-text alignment based on textual prompts or user prompts. <Prompt Start> a cute anime girl with massive fennec ears mouth open and a big fluffy tail long blonde hair and blue eyes wearing a maid outfit with a long black dress and a large purple liquid stained white apron and white gloves and black leggings sitting on a large cushion in the middle of a kitchen in a dark victorian mansion with a stained glass window drinking a glass with a galaxy inside"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": "CheckpointLoaderSimple",
|
||||
"pos": [
|
||||
26,
|
||||
474
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
98
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"slot_index": 1,
|
||||
"links": [
|
||||
3,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"slot_index": 2,
|
||||
"links": [
|
||||
8
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "CheckpointLoaderSimple"
|
||||
},
|
||||
"widgets_values": [
|
||||
"lumina_2.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": "KSampler",
|
||||
"pos": [
|
||||
863,
|
||||
186
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
262
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 13
|
||||
},
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"link": 4
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"link": 6
|
||||
},
|
||||
{
|
||||
"name": "latent_image",
|
||||
"type": "LATENT",
|
||||
"link": 17
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
14
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.40",
|
||||
"Node name for S&R": "KSampler"
|
||||
},
|
||||
"widgets_values": [
|
||||
854547257397629,
|
||||
"fixed",
|
||||
30,
|
||||
4,
|
||||
"res_multistep",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"type": "TeaCache",
|
||||
"pos": [
|
||||
115.17221069335938,
|
||||
-15.953104019165039
|
||||
],
|
||||
"size": [
|
||||
270,
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 19
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"links": [
|
||||
18
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"ver": "9db9e3393f674bd32cc1ce5ce271fb4994ef19c8",
|
||||
"Node name for S&R": "TeaCache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"lumina_2",
|
||||
0.38000000000000006,
|
||||
0.20000000000000004,
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
3,
|
||||
4,
|
||||
1,
|
||||
6,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
4,
|
||||
6,
|
||||
0,
|
||||
3,
|
||||
1,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
5,
|
||||
4,
|
||||
1,
|
||||
7,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
6,
|
||||
7,
|
||||
0,
|
||||
3,
|
||||
2,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
8,
|
||||
4,
|
||||
2,
|
||||
8,
|
||||
1,
|
||||
"VAE"
|
||||
],
|
||||
[
|
||||
13,
|
||||
11,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
"MODEL"
|
||||
],
|
||||
[
|
||||
14,
|
||||
3,
|
||||
0,
|
||||
8,
|
||||
0,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
16,
|
||||
8,
|
||||
0,
|
||||
9,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
17,
|
||||
13,
|
||||
0,
|
||||
3,
|
||||
3,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
18,
|
||||
16,
|
||||
0,
|
||||
11,
|
||||
0,
|
||||
"MODEL"
|
||||
],
|
||||
[
|
||||
19,
|
||||
4,
|
||||
0,
|
||||
16,
|
||||
0,
|
||||
"MODEL"
|
||||
]
|
||||
],
|
||||
"groups": [],
|
||||
"config": {},
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.9229599817706542,
|
||||
"offset": [
|
||||
177.2446861106523,
|
||||
88.4368399734896
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9"
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
+85
-85
@@ -86,8 +86,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"Half body portrait of 60 years old guy, with an surprised expression, he is lost in vectors of AI models, sourounded by PC monitors and many cables, on his tshirt is a text with words printed in Arial font:\"PuLID Flux\", detailed, glowy background, photorealistic style with skin inperfections, looks like shot with an smartphone, skin details without plastic look, ASUS Keyboard.",
|
||||
true
|
||||
"Half body portrait of 60 years old guy, with an surprised expression, he is lost in vectors of AI models, sourounded by PC monitors and many cables, on his tshirt is a text with words printed in Arial font:\"PuLID Flux\", detailed, glowy background, photorealistic style with skin inperfections, looks like shot with an smartphone, skin details without plastic look, ASUS Keyboard."
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
@@ -164,46 +163,6 @@
|
||||
"euler"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
729,
|
||||
-490
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
314
|
||||
],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
126
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MASK",
|
||||
"type": "MASK",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"einstein.jpg",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"type": "PulidFluxInsightFaceLoader",
|
||||
@@ -216,7 +175,7 @@
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -250,7 +209,7 @@
|
||||
26
|
||||
],
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -282,7 +241,7 @@
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -451,7 +410,7 @@
|
||||
130
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -476,40 +435,6 @@
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": "VAELoader",
|
||||
"pos": [
|
||||
12,
|
||||
285
|
||||
],
|
||||
"size": [
|
||||
311.81634521484375,
|
||||
60.429901123046875
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
88
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "VAELoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ae.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"type": "BasicScheduler",
|
||||
@@ -566,7 +491,7 @@
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
@@ -712,6 +637,80 @@
|
||||
true
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
729,
|
||||
-490
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
314
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
126
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MASK",
|
||||
"type": "MASK",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"einstein.jpg",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": "VAELoader",
|
||||
"pos": [
|
||||
10.668999671936035,
|
||||
308.9579772949219
|
||||
],
|
||||
"size": [
|
||||
311.81634521484375,
|
||||
60.429901123046875
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
88
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "VAELoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ae.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"type": "TeaCache",
|
||||
@@ -721,7 +720,7 @@
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
130
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
@@ -752,7 +751,8 @@
|
||||
"flux",
|
||||
0.4,
|
||||
0,
|
||||
1
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -957,6 +957,7 @@
|
||||
393.878662729893
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.26",
|
||||
"ComfyUI-PuLID-Flux-Enhanced": "04e1b52320f1f14383afe18959349703623c5b88",
|
||||
@@ -966,8 +967,7 @@
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true,
|
||||
"frontendVersion": "1.19.9"
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
+50
-56
@@ -77,11 +77,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
|
||||
[
|
||||
false,
|
||||
true
|
||||
]
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
@@ -205,11 +201,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around",
|
||||
[
|
||||
false,
|
||||
true
|
||||
]
|
||||
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
@@ -256,46 +248,6 @@
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"type": "ModelSamplingSD3",
|
||||
"pos": [
|
||||
510,
|
||||
70
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 117
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
111
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingSD3"
|
||||
},
|
||||
"widgets_values": [
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"type": "CLIPLoader",
|
||||
@@ -638,7 +590,7 @@
|
||||
],
|
||||
"size": [
|
||||
337.4713439941406,
|
||||
130
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
@@ -661,15 +613,57 @@
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"aux_id": "welltop-cn/ComfyUI-TeaCache",
|
||||
"ver": "efe06530d43486df4431d4c7dea1873b738c647a",
|
||||
"Node name for S&R": "TeaCache"
|
||||
"Node name for S&R": "TeaCache",
|
||||
"cnr_id": "teacache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"wan2.1_i2v_480p_14B_ret_mode",
|
||||
0.30000000000000004,
|
||||
0.10000000000000002,
|
||||
1
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"type": "ModelSamplingSD3",
|
||||
"pos": [
|
||||
516.363525390625,
|
||||
79.99998474121094
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 117
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
111
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingSD3"
|
||||
},
|
||||
"widgets_values": [
|
||||
8
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -829,6 +823,7 @@
|
||||
255.9140408750332
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.26",
|
||||
"ComfyUI-VideoHelperSuite": "124c913ccdd8a585734ea758c35fa1bab8499c99",
|
||||
@@ -838,8 +833,7 @@
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true,
|
||||
"frontendVersion": "1.19.9"
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
+128
-134
@@ -76,11 +76,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
|
||||
[
|
||||
false,
|
||||
true
|
||||
]
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
@@ -197,11 +193,7 @@
|
||||
"Node name for S&R": "CLIPTextEncode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"a fox moving quickly in a beautiful winter scenery nature trees mountains daytime tracking camera",
|
||||
[
|
||||
false,
|
||||
true
|
||||
]
|
||||
"a fox moving quickly in a beautiful winter scenery nature trees mountains daytime tracking camera"
|
||||
],
|
||||
"color": "#232",
|
||||
"bgcolor": "#353"
|
||||
@@ -258,7 +250,7 @@
|
||||
],
|
||||
"size": [
|
||||
292.3946838378906,
|
||||
334
|
||||
505.1507873535156
|
||||
],
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
@@ -315,18 +307,138 @@
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"filename": "teacache_00084.mp4",
|
||||
"filename": "teacache_00047.mp4",
|
||||
"subfolder": "",
|
||||
"type": "output",
|
||||
"format": "video/h264-mp4",
|
||||
"frame_rate": 16,
|
||||
"workflow": "teacache_00084.png",
|
||||
"fullpath": "/home/yuyunjie/code/ComfyUI/output/teacache_00084.mp4"
|
||||
"workflow": "teacache_00047.png",
|
||||
"fullpath": "/mnt/aiface/yyj/code/ComfyUI/output/teacache_00047.mp4"
|
||||
},
|
||||
"muted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"type": "UNETLoader",
|
||||
"pos": [
|
||||
20,
|
||||
40
|
||||
],
|
||||
"size": [
|
||||
346.7470703125,
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
100
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "UNETLoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"wan2.1_t2v_1.3B_fp16.safetensors",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"type": "ModelSamplingSD3",
|
||||
"pos": [
|
||||
438.8999938964844,
|
||||
73.09999084472656
|
||||
],
|
||||
"size": [
|
||||
210,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 101
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
95
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingSD3"
|
||||
},
|
||||
"widgets_values": [
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"type": "TeaCache",
|
||||
"pos": [
|
||||
386.0345458984375,
|
||||
-121.91252136230469
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
154
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 100
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
101
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"aux_id": "welltop-cn/ComfyUI-TeaCache",
|
||||
"ver": "efe06530d43486df4431d4c7dea1873b738c647a",
|
||||
"Node name for S&R": "TeaCache",
|
||||
"cnr_id": "teacache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"wan2.1_t2v_1.3B_ret_mode",
|
||||
0.15000000000000002,
|
||||
0.10000000000000002,
|
||||
1,
|
||||
"cuda"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": "KSampler",
|
||||
@@ -387,124 +499,6 @@
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"type": "ModelSamplingSD3",
|
||||
"pos": [
|
||||
440,
|
||||
50
|
||||
],
|
||||
"size": [
|
||||
210,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 101
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
95
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "ModelSamplingSD3"
|
||||
},
|
||||
"widgets_values": [
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"type": "UNETLoader",
|
||||
"pos": [
|
||||
20,
|
||||
40
|
||||
],
|
||||
"size": [
|
||||
346.7470703125,
|
||||
82
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
100
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.3.34",
|
||||
"Node name for S&R": "UNETLoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"wan2.1_t2v_1.3B_fp16.safetensors",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"type": "TeaCache",
|
||||
"pos": [
|
||||
386.0345458984375,
|
||||
-121.91252136230469
|
||||
],
|
||||
"size": [
|
||||
315,
|
||||
130
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"link": 100
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "model",
|
||||
"type": "MODEL",
|
||||
"slot_index": 0,
|
||||
"links": [
|
||||
101
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "teacache",
|
||||
"ver": "efe06530d43486df4431d4c7dea1873b738c647a",
|
||||
"Node name for S&R": "TeaCache"
|
||||
},
|
||||
"widgets_values": [
|
||||
"wan2.1_t2v_1.3B_ret_mode",
|
||||
0.15000000000000002,
|
||||
0.10000000000000002,
|
||||
1
|
||||
]
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
@@ -607,6 +601,7 @@
|
||||
297.73529230242883
|
||||
]
|
||||
},
|
||||
"frontendVersion": "1.18.9",
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.26",
|
||||
"ComfyUI-VideoHelperSuite": "124c913ccdd8a585734ea758c35fa1bab8499c99",
|
||||
@@ -616,8 +611,7 @@
|
||||
"VHS_latentpreview": false,
|
||||
"VHS_latentpreviewrate": 0,
|
||||
"VHS_MetadataImage": true,
|
||||
"VHS_KeepIntermediate": true,
|
||||
"frontendVersion": "1.19.9"
|
||||
"VHS_KeepIntermediate": true
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
@@ -17,7 +17,9 @@ from comfy.ldm.wan.model import sinusoidal_embedding_1d
|
||||
SUPPORTED_MODELS_COEFFICIENTS = {
|
||||
"flux": [4.98651651e+02, -2.83781631e+02, 5.58554382e+01, -3.82021401e+00, 2.64230861e-01],
|
||||
"ltxv": [2.14700694e+01, -1.28016453e+01, 2.31279151e+00, 7.92487521e-01, 9.69274326e-03],
|
||||
"lumina_2": [-8.74643948e+02, 4.66059906e+02, -7.51559762e+01, 5.32836175e+00, -3.27258296e-02],
|
||||
"hunyuan_video": [7.33226126e+02, -4.01131952e+02, 6.75869174e+01, -3.14987800e+00, 9.61237896e-02],
|
||||
"hidream_i1_dev": [1.39997273, -4.30130469, 5.01534416, -2.20504164, 0.93942874],
|
||||
"hidream_i1_full": [-3.13605009e+04, -7.12425503e+02, 4.91363285e+01, 8.26515490e+00, 1.08053901e-01],
|
||||
"wan2.1_t2v_1.3B": [2.39676752e+03, -1.31110545e+03, 2.01331979e+02, -8.29855975e+00, 1.37887774e-01],
|
||||
"wan2.1_t2v_14B": [-5784.54975374, 5449.50911966, -1811.16591783, 256.27178429, -13.02252404],
|
||||
@@ -52,6 +54,7 @@ def teacache_flux_forward(
|
||||
rel_l1_thresh = transformer_options.get("rel_l1_thresh")
|
||||
coefficients = transformer_options.get("coefficients")
|
||||
enable_teacache = transformer_options.get("enable_teacache", True)
|
||||
cache_device = transformer_options.get("cache_device")
|
||||
|
||||
if img.ndim != 3 or txt.ndim != 3:
|
||||
raise ValueError("Input img and txt tensors must have 3 dimensions.")
|
||||
@@ -78,7 +81,7 @@ def teacache_flux_forward(
|
||||
# enable teacache
|
||||
img_mod1, _ = self.double_blocks[0].img_mod(vec)
|
||||
modulated_inp = self.double_blocks[0].img_norm1(img)
|
||||
modulated_inp = apply_mod(modulated_inp, (1 + img_mod1.scale), img_mod1.shift)
|
||||
modulated_inp = apply_mod(modulated_inp, (1 + img_mod1.scale), img_mod1.shift).to(cache_device)
|
||||
ca_idx = 0
|
||||
|
||||
if not hasattr(self, 'accumulated_rel_l1_distance'):
|
||||
@@ -104,7 +107,7 @@ def teacache_flux_forward(
|
||||
if not should_calc:
|
||||
img += self.previous_residual.to(img.device)
|
||||
else:
|
||||
ori_img = img.clone()
|
||||
ori_img = img.to(cache_device)
|
||||
for i, block in enumerate(self.double_blocks):
|
||||
if ("double_block", i) in blocks_replace:
|
||||
def block_wrap(args):
|
||||
@@ -189,7 +192,7 @@ def teacache_flux_forward(
|
||||
img = torch.cat((txt, real_img), 1)
|
||||
|
||||
img = img[:, txt.shape[1] :, ...]
|
||||
self.previous_residual = (img - ori_img).to(mm.unet_offload_device())
|
||||
self.previous_residual = img.to(cache_device) - ori_img
|
||||
|
||||
img = self.final_layer(img, vec) # (N, T, patch_size ** 2 * out_channels)
|
||||
|
||||
@@ -209,7 +212,9 @@ def teacache_hidream_forward(
|
||||
rel_l1_thresh = transformer_options.get("rel_l1_thresh")
|
||||
coefficients = transformer_options.get("coefficients")
|
||||
cond_or_uncond = transformer_options.get("cond_or_uncond")
|
||||
model_type = transformer_options.get("model_type")
|
||||
enable_teacache = transformer_options.get("enable_teacache", True)
|
||||
cache_device = transformer_options.get("cache_device")
|
||||
|
||||
bs, c, h, w = x.shape
|
||||
if image_cond is not None:
|
||||
@@ -265,7 +270,7 @@ def teacache_hidream_forward(
|
||||
rope = self.pe_embedder(ids)
|
||||
|
||||
# enable teacache
|
||||
modulated_inp = timesteps.to(mm.unet_offload_device())
|
||||
modulated_inp = timesteps.to(cache_device) if "full" in model_type else hidden_states.to(cache_device)
|
||||
if not hasattr(self, 'teacache_state'):
|
||||
self.teacache_state = {
|
||||
0: {'should_calc': True, 'accumulated_rel_l1_distance': 0, 'previous_modulated_input': None, 'previous_residual': None},
|
||||
@@ -303,7 +308,7 @@ def teacache_hidream_forward(
|
||||
hidden_states[i*b:(i+1)*b] += self.teacache_state[k]['previous_residual'].to(hidden_states.device)
|
||||
else:
|
||||
# 2. Blocks
|
||||
ori_hidden_states = hidden_states.clone()
|
||||
ori_hidden_states = hidden_states.to(cache_device)
|
||||
block_id = 0
|
||||
initial_encoder_hidden_states = torch.cat([encoder_hidden_states[-1], encoder_hidden_states[-2]], dim=1)
|
||||
initial_encoder_hidden_states_seq_len = initial_encoder_hidden_states.shape[1]
|
||||
@@ -345,11 +350,83 @@ def teacache_hidream_forward(
|
||||
|
||||
hidden_states = hidden_states[:, :image_tokens_seq_len, ...]
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
self.teacache_state[k]['previous_residual'] = (hidden_states - ori_hidden_states)[i*b:(i+1)*b].to(mm.unet_offload_device())
|
||||
self.teacache_state[k]['previous_residual'] = (hidden_states.to(cache_device) - ori_hidden_states)[i*b:(i+1)*b]
|
||||
|
||||
output = self.final_layer(hidden_states, adaln_input)
|
||||
output = self.unpatchify(output, img_sizes)
|
||||
return -output[:, :, :h, :w]
|
||||
return -output[:, :, :h, :w]
|
||||
|
||||
def teacache_lumina_forward(self, x, timesteps, context, num_tokens, attention_mask=None, transformer_options={}, **kwargs):
|
||||
rel_l1_thresh = transformer_options.get("rel_l1_thresh")
|
||||
coefficients = transformer_options.get("coefficients")
|
||||
cond_or_uncond = transformer_options.get("cond_or_uncond")
|
||||
enable_teacache = transformer_options.get("enable_teacache", True)
|
||||
cache_device = transformer_options.get("cache_device")
|
||||
|
||||
t = 1.0 - timesteps
|
||||
cap_feats = context
|
||||
cap_mask = attention_mask
|
||||
bs, c, h, w = x.shape
|
||||
x = comfy.ldm.common_dit.pad_to_patch_size(x, (self.patch_size, self.patch_size))
|
||||
|
||||
t = self.t_embedder(t, dtype=x.dtype) # (N, D)
|
||||
adaln_input = t
|
||||
|
||||
cap_feats = self.cap_embedder(cap_feats) # (N, L, D) # todo check if able to batchify w.o. redundant compute
|
||||
|
||||
x_is_tensor = isinstance(x, torch.Tensor)
|
||||
x, mask, img_size, cap_size, freqs_cis = self.patchify_and_embed(x, cap_feats, cap_mask, t, num_tokens)
|
||||
freqs_cis = freqs_cis.to(x.device)
|
||||
|
||||
# enable teacache
|
||||
modulated_inp = t.to(cache_device)
|
||||
if not hasattr(self, 'teacache_state'):
|
||||
self.teacache_state = {
|
||||
0: {'should_calc': True, 'accumulated_rel_l1_distance': 0, 'previous_modulated_input': None, 'previous_residual': None},
|
||||
1: {'should_calc': True, 'accumulated_rel_l1_distance': 0, 'previous_modulated_input': None, 'previous_residual': None}
|
||||
}
|
||||
|
||||
def update_cache_state(cache, modulated_inp):
|
||||
if cache['previous_modulated_input'] is not None:
|
||||
try:
|
||||
cache['accumulated_rel_l1_distance'] += poly1d(coefficients, ((modulated_inp-cache['previous_modulated_input']).abs().mean() / cache['previous_modulated_input'].abs().mean()))
|
||||
if cache['accumulated_rel_l1_distance'] < rel_l1_thresh:
|
||||
cache['should_calc'] = False
|
||||
else:
|
||||
cache['should_calc'] = True
|
||||
cache['accumulated_rel_l1_distance'] = 0
|
||||
except:
|
||||
cache['should_calc'] = True
|
||||
cache['accumulated_rel_l1_distance'] = 0
|
||||
cache['previous_modulated_input'] = modulated_inp
|
||||
|
||||
b = int(len(x) / len(cond_or_uncond))
|
||||
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
update_cache_state(self.teacache_state[k], modulated_inp[i*b:(i+1)*b])
|
||||
|
||||
if enable_teacache:
|
||||
should_calc = False
|
||||
for k in cond_or_uncond:
|
||||
should_calc = (should_calc or self.teacache_state[k]['should_calc'])
|
||||
else:
|
||||
should_calc = True
|
||||
|
||||
if not should_calc:
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
x[i*b:(i+1)*b] += self.teacache_state[k]['previous_residual'].to(x.device)
|
||||
else:
|
||||
ori_x = x.to(cache_device)
|
||||
# 2. Blocks
|
||||
for layer in self.layers:
|
||||
x = layer(x, mask, freqs_cis, adaln_input)
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
self.teacache_state[k]['previous_residual'] = (x.to(cache_device) - ori_x)[i*b:(i+1)*b]
|
||||
|
||||
x = self.final_layer(x, adaln_input)
|
||||
x = self.unpatchify(x, img_size, cap_size, return_tensor=x_is_tensor)[:,:,:h,:w]
|
||||
|
||||
return -x
|
||||
|
||||
def teacache_hunyuanvideo_forward(
|
||||
self,
|
||||
@@ -370,6 +447,7 @@ def teacache_hunyuanvideo_forward(
|
||||
rel_l1_thresh = transformer_options.get("rel_l1_thresh")
|
||||
coefficients = transformer_options.get("coefficients")
|
||||
enable_teacache = transformer_options.get("enable_teacache", True)
|
||||
cache_device = transformer_options.get("cache_device")
|
||||
|
||||
initial_shape = list(img.shape)
|
||||
# running on sequences img
|
||||
@@ -421,7 +499,7 @@ def teacache_hunyuanvideo_forward(
|
||||
# enable teacache
|
||||
img_mod1, _ = self.double_blocks[0].img_mod(vec)
|
||||
modulated_inp = self.double_blocks[0].img_norm1(img)
|
||||
modulated_inp = apply_mod(modulated_inp, (1 + img_mod1.scale), img_mod1.shift, modulation_dims)
|
||||
modulated_inp = apply_mod(modulated_inp, (1 + img_mod1.scale), img_mod1.shift, modulation_dims).to(cache_device)
|
||||
|
||||
if not hasattr(self, 'accumulated_rel_l1_distance'):
|
||||
should_calc = True
|
||||
@@ -446,7 +524,7 @@ def teacache_hunyuanvideo_forward(
|
||||
if not should_calc:
|
||||
img += self.previous_residual.to(img.device)
|
||||
else:
|
||||
ori_img = img.clone()
|
||||
ori_img = img.to(cache_device)
|
||||
for i, block in enumerate(self.double_blocks):
|
||||
if ("double_block", i) in blocks_replace:
|
||||
def block_wrap(args):
|
||||
@@ -489,7 +567,7 @@ def teacache_hunyuanvideo_forward(
|
||||
img[:, : img_len] += add
|
||||
|
||||
img = img[:, : img_len]
|
||||
self.previous_residual = (img - ori_img).to(mm.unet_offload_device())
|
||||
self.previous_residual = (img.to(cache_device) - ori_img)
|
||||
|
||||
if ref_latent is not None:
|
||||
img = img[:, ref_latent.shape[1]:]
|
||||
@@ -520,6 +598,7 @@ def teacache_ltxvmodel_forward(
|
||||
coefficients = transformer_options.get("coefficients")
|
||||
cond_or_uncond = transformer_options.get("cond_or_uncond")
|
||||
enable_teacache = transformer_options.get("enable_teacache", True)
|
||||
cache_device = transformer_options.get("cache_device")
|
||||
|
||||
orig_shape = list(x.shape)
|
||||
|
||||
@@ -568,8 +647,8 @@ def teacache_ltxvmodel_forward(
|
||||
blocks_replace = patches_replace.get("dit", {})
|
||||
|
||||
# enable teacache
|
||||
inp = x.to(mm.unet_offload_device())
|
||||
timestep_ = timestep.to(mm.unet_offload_device())
|
||||
inp = x.to(cache_device)
|
||||
timestep_ = timestep.to(cache_device)
|
||||
num_ada_params = self.transformer_blocks[0].scale_shift_table.shape[0]
|
||||
ada_values = self.transformer_blocks[0].scale_shift_table[None, None].to(timestep_.device) + timestep_.reshape(batch_size, timestep_.size(1), num_ada_params, -1)
|
||||
shift_msa, scale_msa, _, _, _, _ = ada_values.unbind(dim=2)
|
||||
@@ -612,7 +691,7 @@ def teacache_ltxvmodel_forward(
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
x[i*b:(i+1)*b] += self.teacache_state[k]['previous_residual'].to(x.device)
|
||||
else:
|
||||
ori_x = x.clone()
|
||||
ori_x = x.to(cache_device)
|
||||
for i, block in enumerate(self.transformer_blocks):
|
||||
if ("double_block", i) in blocks_replace:
|
||||
def block_wrap(args):
|
||||
@@ -640,7 +719,7 @@ def teacache_ltxvmodel_forward(
|
||||
# Modulation
|
||||
x = x * (1 + scale) + shift
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
self.teacache_state[k]['previous_residual'] = (x - ori_x)[i*b:(i+1)*b].to(mm.unet_offload_device())
|
||||
self.teacache_state[k]['previous_residual'] = (x.to(cache_device) - ori_x)[i*b:(i+1)*b]
|
||||
|
||||
x = self.proj_out(x)
|
||||
|
||||
@@ -668,8 +747,9 @@ def teacache_wanmodel_forward(
|
||||
rel_l1_thresh = transformer_options.get("rel_l1_thresh")
|
||||
coefficients = transformer_options.get("coefficients")
|
||||
cond_or_uncond = transformer_options.get("cond_or_uncond")
|
||||
use_ret_mode = transformer_options.get("use_ret_mode")
|
||||
model_type = transformer_options.get("model_type")
|
||||
enable_teacache = transformer_options.get("enable_teacache", True)
|
||||
cache_device = transformer_options.get("cache_device")
|
||||
|
||||
# embeddings
|
||||
x = self.patch_embedding(x.float()).to(x.dtype)
|
||||
@@ -694,7 +774,7 @@ def teacache_wanmodel_forward(
|
||||
blocks_replace = patches_replace.get("dit", {})
|
||||
|
||||
# enable teacache
|
||||
modulated_inp = e0.to(mm.unet_offload_device()) if use_ret_mode else e.to(mm.unet_offload_device())
|
||||
modulated_inp = e0.to(cache_device) if "ret_mode" in model_type else e.to(cache_device)
|
||||
if not hasattr(self, 'teacache_state'):
|
||||
self.teacache_state = {
|
||||
0: {'should_calc': True, 'accumulated_rel_l1_distance': 0, 'previous_modulated_input': None, 'previous_residual': None},
|
||||
@@ -731,7 +811,7 @@ def teacache_wanmodel_forward(
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
x[i*b:(i+1)*b] += self.teacache_state[k]['previous_residual'].to(x.device)
|
||||
else:
|
||||
ori_x = x.clone()
|
||||
ori_x = x.to(cache_device)
|
||||
for i, block in enumerate(self.blocks):
|
||||
if ("double_block", i) in blocks_replace:
|
||||
def block_wrap(args):
|
||||
@@ -743,7 +823,7 @@ def teacache_wanmodel_forward(
|
||||
else:
|
||||
x = block(x, e=e0, freqs=freqs, context=context, context_img_len=context_img_len)
|
||||
for i, k in enumerate(cond_or_uncond):
|
||||
self.teacache_state[k]['previous_residual'] = (x - ori_x)[i*b:(i+1)*b].to(mm.unet_offload_device())
|
||||
self.teacache_state[k]['previous_residual'] = (x.to(cache_device) - ori_x)[i*b:(i+1)*b]
|
||||
|
||||
# head
|
||||
x = self.head(x, e)
|
||||
@@ -758,10 +838,11 @@ class TeaCache:
|
||||
return {
|
||||
"required": {
|
||||
"model": ("MODEL", {"tooltip": "The diffusion model the TeaCache will be applied to."}),
|
||||
"model_type": (["flux", "ltxv", "hunyuan_video", "hidream_i1_full", "wan2.1_t2v_1.3B", "wan2.1_t2v_14B", "wan2.1_i2v_480p_14B", "wan2.1_i2v_720p_14B", "wan2.1_t2v_1.3B_ret_mode", "wan2.1_t2v_14B_ret_mode", "wan2.1_i2v_480p_14B_ret_mode", "wan2.1_i2v_720p_14B_ret_mode"], {"default": "flux", "tooltip": "Supported diffusion model."}),
|
||||
"model_type": (["flux", "ltxv", "lumina_2", "hunyuan_video", "hidream_i1_dev", "hidream_i1_full", "wan2.1_t2v_1.3B", "wan2.1_t2v_14B", "wan2.1_i2v_480p_14B", "wan2.1_i2v_720p_14B", "wan2.1_t2v_1.3B_ret_mode", "wan2.1_t2v_14B_ret_mode", "wan2.1_i2v_480p_14B_ret_mode", "wan2.1_i2v_720p_14B_ret_mode"], {"default": "flux", "tooltip": "Supported diffusion model."}),
|
||||
"rel_l1_thresh": ("FLOAT", {"default": 0.4, "min": 0.0, "max": 10.0, "step": 0.01, "tooltip": "How strongly to cache the output of diffusion model. This value must be non-negative."}),
|
||||
"start_percent": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "The start percentage of the steps that will apply TeaCache."}),
|
||||
"end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "The end percentage of the steps that will apply TeaCache."})
|
||||
"end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "The end percentage of the steps that will apply TeaCache."}),
|
||||
"cache_device": (["cuda", "cpu"], {"default": "cuda", "tooltip": "Device where the cache will reside"}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,7 +852,7 @@ class TeaCache:
|
||||
CATEGORY = "TeaCache"
|
||||
TITLE = "TeaCache"
|
||||
|
||||
def apply_teacache(self, model, model_type: str, rel_l1_thresh: float, start_percent: float, end_percent: float):
|
||||
def apply_teacache(self, model, model_type: str, rel_l1_thresh: float, start_percent: float, end_percent: float, cache_device: str):
|
||||
if rel_l1_thresh == 0:
|
||||
return (model,)
|
||||
|
||||
@@ -780,7 +861,9 @@ class TeaCache:
|
||||
new_model.model_options['transformer_options'] = {}
|
||||
new_model.model_options["transformer_options"]["rel_l1_thresh"] = rel_l1_thresh
|
||||
new_model.model_options["transformer_options"]["coefficients"] = SUPPORTED_MODELS_COEFFICIENTS[model_type]
|
||||
new_model.model_options["transformer_options"]["use_ret_mode"] = "ret_mode" in model_type
|
||||
new_model.model_options["transformer_options"]["model_type"] = model_type
|
||||
new_model.model_options["transformer_options"]["cache_device"] = mm.get_torch_device() if cache_device == "cuda" else torch.device("cpu")
|
||||
|
||||
diffusion_model = new_model.get_model_object("diffusion_model")
|
||||
|
||||
if "flux" in model_type:
|
||||
@@ -789,8 +872,14 @@ class TeaCache:
|
||||
diffusion_model,
|
||||
forward_orig=teacache_flux_forward.__get__(diffusion_model, diffusion_model.__class__)
|
||||
)
|
||||
elif "hidream_i1" in model_type:
|
||||
elif "lumina_2" in model_type:
|
||||
is_cfg = True
|
||||
context = patch.multiple(
|
||||
diffusion_model,
|
||||
forward=teacache_lumina_forward.__get__(diffusion_model, diffusion_model.__class__)
|
||||
)
|
||||
elif "hidream_i1" in model_type:
|
||||
is_cfg = True if "full" in model_type else False
|
||||
context = patch.multiple(
|
||||
diffusion_model,
|
||||
forward=teacache_hidream_forward.__get__(diffusion_model, diffusion_model.__class__)
|
||||
@@ -820,7 +909,6 @@ class TeaCache:
|
||||
input = kwargs["input"]
|
||||
timestep = kwargs["timestep"]
|
||||
c = kwargs["c"]
|
||||
cond_or_uncond = kwargs["cond_or_uncond"]
|
||||
# referenced from https://github.com/kijai/ComfyUI-KJNodes/blob/d126b62cebee81ea14ec06ea7cd7526999cb0554/nodes/model_optimization_nodes.py#L868
|
||||
sigmas = c["transformer_options"]["sample_sigmas"]
|
||||
matched_step_index = (sigmas == timestep[0]).nonzero()
|
||||
@@ -836,10 +924,14 @@ class TeaCache:
|
||||
|
||||
if current_step_index == 0:
|
||||
if is_cfg:
|
||||
# uncond first
|
||||
if (1 in cond_or_uncond) and hasattr(diffusion_model, 'teacache_state'):
|
||||
delattr(diffusion_model, 'teacache_state')
|
||||
# uncond -> 1, cond -> 0
|
||||
if hasattr(diffusion_model, 'teacache_state') and \
|
||||
diffusion_model.teacache_state[0]['previous_modulated_input'] is not None and \
|
||||
diffusion_model.teacache_state[1]['previous_modulated_input'] is not None:
|
||||
delattr(diffusion_model, 'teacache_state')
|
||||
else:
|
||||
if hasattr(diffusion_model, 'teacache_state'):
|
||||
delattr(diffusion_model, 'teacache_state')
|
||||
if hasattr(diffusion_model, 'accumulated_rel_l1_distance'):
|
||||
delattr(diffusion_model, 'accumulated_rel_l1_distance')
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "teacache"
|
||||
description = "Unofficial implementation of [ali-vilab/TeaCache](https://github.com/ali-vilab/TeaCache) for ComfyUI"
|
||||
version = "1.6.1"
|
||||
version = "1.7.0"
|
||||
license = {file = "LICENSE"}
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user