Comfy-Org / Comfy-Org/ComfyUI

Wan 2.2 T2V - GPU not used in LowNoise KSampler step at 1 specific resolution

Open
#11,547 3 comments 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

KSampler LowNoise step takes about the same time as KSampler HighNoise step

### Actual Behavior

At 1 specific resolution, 800 x 608, The KSampler LowNoise step stops using the GPU, causing it to take 5 times more time than the KSampler HighNoise step. (the GPU has 1 "spike" of usage, about every 12 seconds)
I can run the same workflow at higher resolutions (ex: 848 x 640) without issues.
During the 800 x 608 run, VRAM usage is maxed out.
During the 858 x 640 run, I have 5 GB VRAM free.

### Steps to Reproduce

Install:
- fresh install of ComfyUI 6.0
- updated run_amd_gpu.bat with: SET PATH=%PATH%;C:\Comfy\python_embeded;C:\Comfy\python_embeded\Scripts
- git clone manager
- install ComfyUI-GGUF nodes

Fresh Run:
- close all apps and browsers, stop comfyui server, exit run_amd_gpu.bat.
- execute run_amd_gpu.bat and wait till FETCH ComfyRegistry finishes
- load Wan 2.2 image-to-video workflow, with Lightning, using these models:
* Wan2.2-I2V-A14B-HighNoise-Q8_0.gguf
* Wan2.2-I2V-A14B-LowNoise-Q8_0.gguf
* wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors
* wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors
* umt5-xxl-encoder-Q8_0.gguf
* wan_2.1_vae.safetensors
- input image (cat sitting against white background) : 768 x 576
- positive prompt: The cat walks away
- negative prompt: empty
- video length : 5 seconds at 16 fps (length 81)

** low resolution runs : works OK **

Run 1:
- fresh run
- output resolution : 512 * 384 => width and height divisible by 64
* KSampler High: 0 minutes and 35 seconds
* KSampler Low : 0 minutes and 34 seconds
* VAE Decode : 0 minutes and 6 seconds

Run 2:
- fresh run
- output resolution : 768 * 576 => width and height divisible by 64
* KSampler High: 2 minutes and 33 seconds
* KSampler Low : 2 minutes and 35 seconds
* VAE Decode : 2 minutes and 5 seconds

** this resolution fails **

Run 3:
- fresh run
- output resolution : 800 * 608 => width divisible by 32 (not by 64), height divisible by 32 (not by 64)
* KSampler High: 3 minutes and 10 seconds
* KSampler Low : 16 minutes and 58 seconds
* VAE Decode : 2 minutes and 22 seconds

** high resolution runs : works OK **

Run 4:
- fresh run
- output resolution : 848 * 640 => width divisible by 16 (not by 32, not by 64), height divisible by 64
* KSampler High: 3 minutes and 49 seconds
* KSampler Low : 3 minutes and 51 seconds
* VAE Decode : 2 minutes and 56 seconds

Run 5:
- fresh run
- output resolution : 928 * 704 => width divisible by 32 (not by 64), height divisible by 64
* KSampler High: 5 minutes and 22 seconds
* KSampler Low : 5 minutes and 22 seconds
* VAE Decode : 4 minutes and 10 seconds

** additional tests : works OK **

Run 6: (= run 3 with increased height)
- fresh run
- output resolution : 800 * 640 => width divisible by 32 (not by 64), height divisible by 64
* KSampler High: 3 minutes and 20 seconds
* KSampler Low : 3 minutes and 21 seconds
* VAE Decode : 2 minutes and 36 seconds

Run 7: (= run 2 with decreased height : 768 * 544) => height divisible by 32 (not by 64) => works fine
Run 8: (= run 4 with increased height : 848 * 672) => height divisible by 32 (not by 64) => works fine

### Debug Logs

```powershell
## ComfyUI-Manager: installing dependencies done.
[2025-12-29 08:06:54.364] ** ComfyUI startup time: 2025-12-29 08:06:54.364
[2025-12-29 08:06:54.364] ** Platform: Windows
[2025-12-29 08:06:54.364] ** Python version: 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]
[2025-12-29 08:06:54.364] ** Python executable: C:\Comfy\python_embeded\python.exe
[2025-12-29 08:06:54.364] ** ComfyUI Path: C:\Comfy\ComfyUI
[2025-12-29 08:06:54.364] ** ComfyUI Base Folder Path: C:\Comfy\ComfyUI
[2025-12-29 08:06:54.364] ** User directory: C:\Comfy\ComfyUI\user
[2025-12-29 08:06:54.364] ** ComfyUI-Manager config path: C:\Comfy\ComfyUI\user\__manager\config.ini
[2025-12-29 08:06:54.364] ** Log path: C:\Comfy\ComfyUI\user\comfyui.log

Prestartup times for custom nodes:
[2025-12-29 08:06:54.958] 1.7 seconds: C:\Comfy\ComfyUI\custom_nodes\comfyui-manager
[2025-12-29 08:06:54.958]
[2025-12-29 08:06:56.044] Checkpoint files will always be loaded safely.
[2025-12-29 08:06:56.275] Total VRAM 24560 MB, total RAM 64669 MB
[2025-12-29 08:06:56.275] pytorch version: 2.9.0+rocmsdk20251116
[2025-12-29 08:06:56.275] Set: torch.backends.cudnn.enabled = False for better AMD performance.
[2025-12-29 08:06:56.275] AMD arch: gfx1100
[2025-12-29 08:06:56.275] ROCm version: (7, 1)
[2025-12-29 08:06:56.275] Set vram state to: NORMAL_VRAM
[2025-12-29 08:06:56.275] Device: cuda:0 AMD Radeon RX 7900 XTX : native
[2025-12-29 08:06:56.291] Enabled pinned memory 29101.0
[2025-12-29 08:06:57.024] Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
[2025-12-29 08:06:58.358] Python version: 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]
[2025-12-29 08:06:58.358] ComfyUI version: 0.6.0
[2025-12-29 08:06:58.390] ComfyUI frontend version: 1.34.9
[2025-12-29 08:06:58.390] [Prompt Server] web root: C:\Comfy\python_embeded\Lib\site-packages\comfyui_frontend_package\static
[2025-12-29 08:06:58.785] Total VRAM 24560 MB, total RAM 64669 MB
[2025-12-29 08:06:58.785] pytorch version: 2.9.0+rocmsdk20251116
[2025-12-29 08:06:58.785] Set: torch.backends.cudnn.enabled = False for better AMD performance.
[2025-12-29 08:06:58.785] AMD arch: gfx1100
[2025-12-29 08:06:58.785] ROCm version: (7, 1)
[2025-12-29 08:06:58.785] Set vram state to: NORMAL_VRAM
[2025-12-29 08:06:58.785] Device: cuda:0 AMD Radeon RX 7900 XTX : native
[2025-12-29 08:06:58.801] Enabled pinned memory 29101.0
[2025-12-29 08:06:59.117] ComfyUI-GGUF: Allowing full torch compile
[2025-12-29 08:06:59.117] ### Loading: ComfyUI-Manager (V3.39)
[2025-12-29 08:06:59.117] [ComfyUI-Manager] network_mode: public
[2025-12-29 08:06:59.117] [ComfyUI-Manager] ComfyUI per-queue preview override detected (PR #11261). Manager's preview method feature is disabled. Use ComfyUI's --preview-method CLI option or 'Settings > Execution > Live preview method'.
[2025-12-29 08:06:59.199] ### ComfyUI Revision: 150 [e4c61d75] *DETACHED | Released on '2025-12-23'
[2025-12-29 08:06:59.199]
Import times for custom nodes:
[2025-12-29 08:06:59.199] 0.0 seconds: C:\Comfy\ComfyUI\custom_nodes\websocket_image_save.py
[2025-12-29 08:06:59.213] 0.0 seconds: C:\Comfy\ComfyUI\custom_nodes\seedvarianceenhancer
[2025-12-29 08:06:59.213] 0.0 seconds: C:\Comfy\ComfyUI\custom_nodes\ComfyUI-GGUF
[2025-12-29 08:06:59.213] 0.1 seconds: C:\Comfy\ComfyUI\custom_nodes\comfyui-manager
[2025-12-29 08:06:59.213]
[2025-12-29 08:06:59.480] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[2025-12-29 08:06:59.496] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[2025-12-29 08:06:59.544] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[2025-12-29 08:06:59.544] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[2025-12-29 08:06:59.575] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
[2025-12-29 08:06:59.860] Context impl SQLiteImpl.
[2025-12-29 08:06:59.860] Will assume non-transactional DDL.
[2025-12-29 08:06:59.860] No target revision found.
[2025-12-29 08:06:59.892] Starting server

[2025-12-29 08:06:59.892] To see the GUI go to: http://127.0.0.1:8188
[2025-12-29 08:07:01.938] [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[2025-12-29 08:07:01.942] [DEPRECATION WARNING] Detected import of deprecated legacy API: /extensions/core/groupNode.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[2025-12-29 08:07:02.133] [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui/components/buttonGroup.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[2025-12-29 08:07:02.137] [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui/components/button.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.
[2025-12-29 08:07:03.407] FETCH ComfyRegistry Data: 5/116
[2025-12-29 08:07:07.957] FETCH ComfyRegistry Data: 10/116
[2025-12-29 08:07:12.036] FETCH ComfyRegistry Data: 15/116
[2025-12-29 08:07:15.791] FETCH ComfyRegistry Data: 20/116
[2025-12-29 08:07:19.467] FETCH ComfyRegistry Data: 25/116
[2025-12-29 08:07:23.453] FETCH ComfyRegistry Data: 30/116
[2025-12-29 08:07:27.123] FETCH ComfyRegistry Data: 35/116
[2025-12-29 08:07:31.968] FETCH ComfyRegistry Data: 40/116
[2025-12-29 08:07:35.625] FETCH ComfyRegistry Data: 45/116
[2025-12-29 08:07:39.314] FETCH ComfyRegistry Data: 50/116
[2025-12-29 08:07:43.604] FETCH ComfyRegistry Data: 55/116
[2025-12-29 08:07:47.656] FETCH ComfyRegistry Data: 60/116
[2025-12-29 08:07:51.745] FETCH ComfyRegistry Data: 65/116
[2025-12-29 08:07:55.462] FETCH ComfyRegistry Data: 70/116
[2025-12-29 08:07:59.438] FETCH ComfyRegistry Data: 75/116
[2025-12-29 08:08:03.721] FETCH ComfyRegistry Data: 80/116
[2025-12-29 08:08:07.453] FETCH ComfyRegistry Data: 85/116
[2025-12-29 08:08:11.477] FETCH ComfyRegistry Data: 90/116
[2025-12-29 08:08:15.615] FETCH ComfyRegistry Data: 95/116
[2025-12-29 08:08:19.349] FETCH ComfyRegistry Data: 100/116
[2025-12-29 08:08:23.006] FETCH ComfyRegistry Data: 105/116
[2025-12-29 08:08:26.771] FETCH ComfyRegistry Data: 110/116
[2025-12-29 08:08:30.473] FETCH ComfyRegistry Data: 115/116
[2025-12-29 08:08:31.689] FETCH ComfyRegistry Data [DONE]
[2025-12-29 08:08:31.793] [ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
[2025-12-29 08:08:31.814] FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE]
[2025-12-29 08:08:32.193] [ComfyUI-Manager] All startup tasks have been completed.
[2025-12-29 08:08:46.082] got prompt
[2025-12-29 08:08:46.132] Using split attention in VAE
[2025-12-29 08:08:46.132] Using split attention in VAE
[2025-12-29 08:08:46.288] VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
[2025-12-29 08:08:52.856] gguf qtypes: Q8_0 (169), F32 (73)
[2025-12-29 08:08:52.999] Attempting to recreate sentencepiece tokenizer from GGUF file metadata...
[2025-12-29 08:08:59.415] Created tokenizer with vocab size of 256384
[2025-12-29 08:08:59.765] Dequantizing token_embd.weight to prevent runtime OOM.
[2025-12-29 08:09:00.716] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
[2025-12-29 08:09:00.732] Requested to load WanTEModel
[2025-12-29 08:09:05.079] loaded completely; 22891.42 MB usable, 6695.95 MB loaded, full load: True
[2025-12-29 08:09:07.590] Requested to load WanVAE
[2025-12-29 08:09:07.664] loaded completely; 11155.39 MB usable, 242.03 MB loaded, full load: True
[2025-12-29 08:09:16.476] gguf qtypes: F16 (694), Q8_0 (400), F32 (1)
[2025-12-29 08:09:16.518] model weight dtype torch.float16, manual cast: None
[2025-12-29 08:09:16.518] model_type FLOW
[2025-12-29 08:09:16.857] Requested to load WAN21
[2025-12-29 08:09:17.977] 0 models unloaded.
[2025-12-29 08:09:30.495] loaded partially; 9692.92 MB usable, 9610.14 MB loaded, 5215.33 MB offloaded, 79.70 MB buffer reserved, lowvram patches: 0
[2025-12-29 08:12:39.574]
100%|████████████████████████████████████████████████████████████████████████████████████| 2/2 [03:08<00:00, 94.36s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 2/2 [03:08<00:00, 94.47s/it]
[2025-12-29 08:12:39.654] gguf qtypes: F16 (694), Q8_0 (400), F32 (1)
[2025-12-29 08:12:39.679] model weight dtype torch.float16, manual cast: None
[2025-12-29 08:12:39.679] model_type FLOW
[2025-12-29 08:12:39.949] Requested to load WAN21
[2025-12-29 08:12:42.118] 0 models unloaded.
[2025-12-29 08:12:56.718] loaded partially; 9646.05 MB usable, 9556.99 MB loaded, 5268.48 MB offloaded, 79.70 MB buffer reserved, lowvram patches: 0
[2025-12-29 08:28:26.817]
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [15:30<00:00, 464.81s/it]
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [15:30<00:00, 465.04s/it]
[2025-12-29 08:28:26.817] Requested to load WanVAE
[2025-12-29 08:28:27.212] loaded completely; 7482.93 MB usable, 242.03 MB loaded, full load: True
[2025-12-29 08:30:47.405] Prompt executed in 00:22:01

for reference, this is the debug log for the 848 x 640 run that works OK :

[2025-12-29 08:35:55.726] got prompt
[2025-12-29 08:35:55.753] Using split attention in VAE
[2025-12-29 08:35:55.755] Using split attention in VAE
[2025-12-29 08:35:55.919] VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
[2025-12-29 08:36:02.397] gguf qtypes: Q8_0 (169), F32 (73)
[2025-12-29 08:36:02.531] Attempting to recreate sentencepiece tokenizer from GGUF file metadata...
[2025-12-29 08:36:08.952] Created tokenizer with vocab size of 256384
[2025-12-29 08:36:09.301] Dequantizing token_embd.weight to prevent runtime OOM.
[2025-12-29 08:36:10.213] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
[2025-12-29 08:36:10.217] Requested to load WanTEModel
[2025-12-29 08:36:14.662] loaded completely; 22891.42 MB usable, 6695.95 MB loaded, full load: True
[2025-12-29 08:36:16.972] Requested to load WanVAE
[2025-12-29 08:36:17.034] loaded completely; 10510.86 MB usable, 242.03 MB loaded, full load: True
[2025-12-29 08:36:38.986] gguf qtypes: F16 (694), Q8_0 (400), F32 (1)
[2025-12-29 08:36:39.017] model weight dtype torch.float16, manual cast: None
[2025-12-29 08:36:39.017] model_type FLOW
[2025-12-29 08:36:39.176] Requested to load WAN21
[2025-12-29 08:36:40.468] 0 models unloaded.
[2025-12-29 08:36:56.663] loaded partially; 9692.92 MB usable, 9610.14 MB loaded, 5215.33 MB offloaded, 79.70 MB buffer reserved, lowvram patches: 0
[2025-12-29 08:40:44.121]
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [03:47<00:00, 113.78s/it]
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [03:47<00:00, 113.67s/it]
[2025-12-29 08:40:44.358] gguf qtypes: F16 (694), Q8_0 (400), F32 (1)
[2025-12-29 08:40:44.390] model weight dtype torch.float16, manual cast: None
[2025-12-29 08:40:44.390] model_type FLOW
[2025-12-29 08:40:44.501] Requested to load WAN21
[2025-12-29 08:40:48.070] 0 models unloaded.
[2025-12-29 08:41:02.141] loaded partially; 9646.05 MB usable, 9556.99 MB loaded, 5268.48 MB offloaded, 79.70 MB buffer reserved, lowvram patches: 0
[2025-12-29 08:44:50.362]
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [03:48<00:00, 113.90s/it]
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [03:48<00:00, 114.10s/it]
[2025-12-29 08:44:50.377] Requested to load WanVAE
[2025-12-29 08:44:50.472] loaded completely; 6731.63 MB usable, 242.03 MB loaded, full load: True
[2025-12-29 08:47:45.558] Prompt executed in 00:11:49
```

### Other

I tried several times, on different days, with reboots, but this 800 x 608 resolution consistenly shows this weird behaviour.

Above, I mentioned "divisible by" because I found references that this is important:
dimensions must be divisible by 16 (also enforced by WanImageToVideo)
=> https://www.alibabacloud.com/help/en/model-studio/image-to-video-by-first-and-last-frame-api-reference
unet dimensions must be divisible by 32
=> https://stackoverflow.com/questions/74844740/why-the-input-width-and-height-should-be-divisible-by-32-for-the-u-net-segmentat

This first screenshot is from the 800 x 608 run (the resolution that has the weird issue)
=> the spikes in the GPU usage occur about every 12 seconds
Image

This second screenshot is from the 840 x 640 run (the higher resolution that works fine)
Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.