ComfyUI-MultiGPU icon indicating copy to clipboard operation
ComfyUI-MultiGPU copied to clipboard

wanvideo2_2_I2V_A14B_example_WIP_Multigpu got torch.OutOfMemoryError

Open suheming opened this issue 1 year ago • 7 comments

Image

Hi, I used your example, but I got GPU OutOfMemoryError.

I uploaded an image(1163 * 872), so I change the reside config to 1108 * 831(720p 4:3 video). for WanVideoBlockSwapMultiGPU, I don't have CUDA:2, so I set blocks_to_swap as 15 and swap_device as cuda:1(since the high and low models both are connect to the only one WanVideoBlockSwapMultiGPU, so I actually don't know the correct value I should select).

When I run I noticed that high model sample used the GPU:0, but the low models sample also used the GPU:0 which I set as cuda:1, that I got an Out of Memory as GPU:1 was never used during the process. Follows are the information of my server and the error.


Multigpu version:nightly[2.2.0]

Total VRAM 24081 MB, total RAM 96533 MB pytorch version: 2.7.1+cu128 xformers version: 0.0.31.post1 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync Using xformers attention Python version: 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0] ComfyUI version: 0.3.50 ComfyUI frontend version: 1.23.4 [Crystools INFO] Crystools version: 1.22.1 [Crystools INFO] CPU: Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz - Arch: x86_64 - OS: Linux 5.15.0-151-generic [Crystools INFO] Pynvml (Nvidia) initialized. [Crystools INFO] GPU/s: [Crystools INFO] 0) NVIDIA GeForce RTX 4090 [Crystools INFO] 1) NVIDIA GeForce RTX 4090 [Crystools INFO] NVIDIA Driver: 580.65.06

Loading: ComfyUI-Manager (V3.36)


got prompt [MultiGPU] WanVideoBlockSwap configuration complete Loading LoRA: Wan22-Lightning/Wan2.2-Lightning_I2V-A14B-4steps-lora_HIGH_fp16 with strength: 3.0 [MultiGPU] WanVideoSampler: Processing on device: cuda:0 Using 400 LoRA weight patches for WanVideo model sigmas: tensor([1.0000, 0.9756, 0.9412, 0.8889, 0.8000, 0.6153, 0.0000]) Sampling until step 3, timestep: 941 timesteps: tensor([999, 975, 941], device='cuda:0') image_cond shape: torch.Size([20, 21, 100, 136]) Swapping 15 transformer blocks Initializing block swap: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [00:00<00:00, 192.99it/s]

Block swap memory summary: Transformer blocks on cuda:1: 5028.47MB Transformer blocks on cuda:0: 8380.79MB Total memory used by transformer blocks: 13409.26MB Non-blocking memory transfer: False

Input sequence length: 71400 Sampling 81 frames at 1088x800 with 6 steps 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [01:19<00:00, 26.52s/it] Allocated memory: memory=9.123 GB Max allocated memory: max_memory=19.944 GB Max reserved memory: max_reserved=21.688 GB !!! Exception during processing !!! Allocation on device Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/execution.py", line 496, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "/home/8TDisk/sd/ComfyUI/execution.py", line 315, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "/home/8TDisk/sd/ComfyUI/execution.py", line 289, in _async_map_node_over_list await process_inputs(input_dict, i) File "/home/8TDisk/sd/ComfyUI/execution.py", line 277, in process_inputs result = f(**inputs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-MultiGPU/wanvideo.py", line 357, in loadmodel return loader.loadmodel(model, base_precision, device, quantization, File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-MultiGPU/wanvideo.py", line 91, in loadmodel result = original_loader.loadmodel(model, base_precision, load_device, quantization, File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes_model_loading.py", line 802, in loadmodel sd = load_torch_file(model_path, device=transformer_load_device, safe_load=True) File "/home/8TDisk/sd/ComfyUI/comfy/utils.py", line 75, in load_torch_file raise e File "/home/8TDisk/sd/ComfyUI/comfy/utils.py", line 62, in load_torch_file tensor = f.get_tensor(k) torch.OutOfMemoryError: Allocation on device

Got an OOM, unloading all loaded models. Prompt executed in 156.82 seconds

suheming avatar Aug 27 '25 10:08 suheming

When using wanvideoloadermultigpu, the model gets loaded onto both cuda:0 and cuda:1 at the same time. Even if you choose cuda:1, the model is still loaded onto cuda:0, though it isn’t used there. However, if either GPU runs out of memory, an out-of-memory error may occur. I’m not sure whether this issue comes from wanvideowrapper itself or from the multigpu node. I currently suggest starting comfyui using --cuda-device 1 to bypass this issue.

I think this might be because ComfyUI’s native wanvideo node loads both the high-noise and low-noise models into the VRAM of either cuda:0 or cuda:1 at the same time, whereas wanvideowrapper releases the VRAM once after the first KSampler and then loads the low-noise model. So, it could be a mechanism issue.

anitman avatar Aug 28 '25 14:08 anitman

I also get OOM when using two GPUs (5090+3090), and I also don’t understand how to properly use block swap in this case

gammahurricane avatar Aug 30 '25 10:08 gammahurricane

Several changes have been made to WanVideoWrapper since this issue was posted.

Can you please try again, and if you end up seeing these issues again, please post your exact workflow and the comfyui run log so I can attempt to replicate your exact issue?

Thanks.

pollockjj avatar Aug 31 '25 20:08 pollockjj

Image

@pollockjj Hi, I upgraded WanVideoWrapper and MultiGPU to the latest version, and run the same workflow, and got the same error.

same flow, same setting, same image, same error.

`Command: ['/home/8TDisk/miniconda3/envs/comfy1/bin/python', 'main.py'] Adding extra search path checkpoints /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/Stable-diffusion Adding extra search path configs /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/Stable-diffusion Adding extra search path vae /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/VAE Adding extra search path loras /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/Lora Adding extra search path loras /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/LyCORIS Adding extra search path upscale_models /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/ESRGAN Adding extra search path upscale_models /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/RealESRGAN Adding extra search path upscale_models /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/SwinIR Adding extra search path embeddings /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/embeddings Adding extra search path hypernetworks /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/hypernetworks Adding extra search path controlnet /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/ControlNet [START] Security scan [DONE] Security scan

ComfyUI-Manager: installing dependencies done.

** ComfyUI startup time: 2025-09-01 20:33:57.247 ** Platform: Linux ** Python version: 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0] ** Python executable: /home/8TDisk/miniconda3/envs/comfy1/bin/python ** ComfyUI Path: /home/8TDisk/sd/ComfyUI ** ComfyUI Base Folder Path: /home/8TDisk/sd/ComfyUI ** User directory: /home/8TDisk/sd/ComfyUI/user ** ComfyUI-Manager config path: /home/8TDisk/sd/ComfyUI/user/default/ComfyUI-Manager/config.ini ** Log path: /home/8TDisk/sd/ComfyUI/user/comfyui.log

####################################################################### [ComfyUI-Manager] Starting dependency installation/(de)activation for the extension

model_url replaced by HF_ENDPOINT, new = https://cdn.comfy.org/drltdata/comfyui-impact-pack/8.22.2/node.zip 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.55M/2.55M [00:01<00:00, 1.44MB/s] Extracted zip file to /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack '/home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack' is moved to '/home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack' Install: pip packages for '/home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack' Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple [!] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple [!] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple [!] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. [SKIP] Downgrading pip package isn't allowed: scipy (cur=1.15.3) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting git+https://github.com/facebookresearch/sam2 Cloning https://github.com/facebookresearch/sam2 to /tmp/pip-req-build-ej5mlk9f [!] Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/sam2 /tmp/pip-req-build-ej5mlk9f [!] 警告:filtering not recognized by server, ignoring [!] 警告:filtering not recognized by server, ignoring Resolved https://github.com/facebookresearch/sam2 to commit 2b90b9f5ceec907a1c18123530e92e794ad901a4 Installing build dependencies: started Installing build dependencies: still running... Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' [!] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. Install: install script for '/home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack' [!] [!] WARN: The COMFYUI_PATH environment variable is not set. Assuming /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack/../../ as the ComfyUI path. [!] [!] WARN: The COMFYUI_MODEL_PATH environment variable is not set. Assuming /home/8TDisk/sd/ComfyUI/models as the ComfyUI path.

ComfyUI-Impact-Pack: Check dependencies

ComfyUI-Impact-Pack: Check basic models

[ComfyUI-Manager] Startup script completed. #######################################################################

[ComfyUI-Manager] Restarting to reapply dependency installation. Command: ['/home/8TDisk/miniconda3/envs/comfy1/bin/python', 'main.py']

Adding extra search path checkpoints /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/Stable-diffusion Adding extra search path configs /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/Stable-diffusion Adding extra search path vae /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/VAE Adding extra search path loras /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/Lora Adding extra search path loras /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/LyCORIS Adding extra search path upscale_models /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/ESRGAN Adding extra search path upscale_models /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/RealESRGAN Adding extra search path upscale_models /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/SwinIR Adding extra search path embeddings /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/embeddings Adding extra search path hypernetworks /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/hypernetworks Adding extra search path controlnet /home/8TDisk/sd/sd-webui/stable-diffusion-webui-roop-fail/models/ControlNet [START] Security scan [DONE] Security scan

ComfyUI-Manager: installing dependencies done.

** ComfyUI startup time: 2025-09-01 20:36:27.908 ** Platform: Linux ** Python version: 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0] ** Python executable: /home/8TDisk/miniconda3/envs/comfy1/bin/python ** ComfyUI Path: /home/8TDisk/sd/ComfyUI ** ComfyUI Base Folder Path: /home/8TDisk/sd/ComfyUI ** User directory: /home/8TDisk/sd/ComfyUI/user ** ComfyUI-Manager config path: /home/8TDisk/sd/ComfyUI/user/default/ComfyUI-Manager/config.ini ** Log path: /home/8TDisk/sd/ComfyUI/user/comfyui.log

Prestartup times for custom nodes: 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/rgthree-comfy 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/Easy-Use 2.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager

Checkpoint files will always be loaded safely. Total VRAM 24081 MB, total RAM 96533 MB pytorch version: 2.7.1+cu128 xformers version: 0.0.31.post1 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync Using xformers attention Python version: 3.10.6 (main, Oct 24 2022, 16:07:47) [GCC 11.2.0] ComfyUI version: 0.3.50 ComfyUI frontend version: 1.23.4 [Prompt Server] web root: /home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/comfyui_frontend_package/static /home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/pyramid/path.py:3: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources [MultiGPU Initialization] Logger initialized with level: INFO [MultiGPU Core Patching] Patching mm.get_torch_device, mm.text_encoder_device, and mm.text_encoder_initial_device [MultiGPU] Device list initialized: ['cpu', 'cuda:0', 'cuda:1'] [MultiGPU] Initiating custom_node Registration. . .

custom_node Found Nodes

ComfyUI-LTXVideo N 0 ComfyUI-Florence2 Y 2 ComfyUI_bitsandbytes_NF4 N 0 x-flux-comfyui N 0 ComfyUI-MMAudio N 0 ComfyUI-GGUF N 0 PuLID_ComfyUI N 0 ComfyUI-HunyuanVideoWrapper N 0 ComfyUI-WanVideoWrapper Y 8

[MultiGPU] Registration complete. Final mappings: DeviceSelectorMultiGPU, HunyuanVideoEmbeddingsAdapter, CheckpointLoaderAdvancedMultiGPU, CheckpointLoaderAdvancedDisTorch2MultiGPU, UNETLoaderMultiGPU, VAELoaderMultiGPU, CLIPLoaderMultiGPU, DualCLIPLoaderMultiGPU, TripleCLIPLoaderMultiGPU, QuadrupleCLIPLoaderMultiGPU, CLIPVisionLoaderMultiGPU, CheckpointLoaderSimpleMultiGPU, ControlNetLoaderMultiGPU, DiffusersLoaderMultiGPU, DiffControlNetLoaderMultiGPU, UNETLoaderDisTorch2MultiGPU, VAELoaderDisTorch2MultiGPU, CLIPLoaderDisTorch2MultiGPU, DualCLIPLoaderDisTorch2MultiGPU, TripleCLIPLoaderDisTorch2MultiGPU, QuadrupleCLIPLoaderDisTorch2MultiGPU, CLIPVisionLoaderDisTorch2MultiGPU, CheckpointLoaderSimpleDisTorch2MultiGPU, ControlNetLoaderDisTorch2MultiGPU, DiffusersLoaderDisTorch2MultiGPU, DiffControlNetLoaderDisTorch2MultiGPU, Florence2ModelLoaderMultiGPU, DownloadAndLoadFlorence2ModelMultiGPU, WanVideoModelLoaderMultiGPU, WanVideoModelLoaderMultiGPU_2, WanVideoVAELoaderMultiGPU, LoadWanVideoT5TextEncoderMultiGPU, LoadWanVideoClipTextEncoderMultiGPU, WanVideoTextEncodeMultiGPU, WanVideoBlockSwapMultiGPU, WanVideoSamplerMultiGPU [Crystools INFO] Crystools version: 1.22.1 [Crystools INFO] CPU: Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz - Arch: x86_64 - OS: Linux 5.15.0-153-generic [Crystools INFO] Pynvml (Nvidia) initialized. [Crystools INFO] GPU/s: [Crystools INFO] 0) NVIDIA GeForce RTX 4090 [Crystools INFO] 1) NVIDIA GeForce RTX 4090 [Crystools INFO] NVIDIA Driver: 580.65.06 [/home/8TDisk/sd/ComfyUI/custom_nodes/controlnet_aux] | INFO -> Using ckpts path: /home/8TDisk/sd/ComfyUI/custom_nodes/controlnet_aux/ckpts [/home/8TDisk/sd/ComfyUI/custom_nodes/controlnet_aux] | INFO -> Using symlinks: False [/home/8TDisk/sd/ComfyUI/custom_nodes/controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider']

Loading: ComfyUI-Manager (V3.36)

[ComfyUI-Manager] network_mode: public

ComfyUI Revision: 3762 [d5c1954d] *DETACHED | Released on '2025-08-13'

======================================== ComfyUI-nunchaku Initialization ======================================== Nunchaku version: 0.3.1 ComfyUI-nunchaku version: 0.3.3 [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json /home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/timm/models/layers/init.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers warnings.warn(f"Importing from {name} is deprecated, please import via timm.layers", FutureWarning) Please 'pip install apex'

Web extensions folder found at /home/8TDisk/sd/ComfyUI/web/extensions/ComfyLiterals WAS Node Suite: OpenCV Python FFMPEG support is enabled WAS Node Suite: ffmpeg_bin_path is set to: /usr/bin/ffmpeg WAS Node Suite: Finished. Loaded 220 nodes successfully.

    "Art is the triumph over chaos." - John Cheever

[rgthree-comfy] Loaded 48 exciting nodes. 🎉

[ComfyUI-Easy-Use] server: v1.3.0 Loaded [ComfyUI-Easy-Use] web root: /home/8TDisk/sd/ComfyUI/custom_nodes/Easy-Use/web_version/v2 Loaded Adding /home/8TDisk/sd/ComfyUI/custom_nodes to sys.path Could not find efficiency nodes Could not find ControlNetPreprocessors nodes Could not find AdvancedControlNet nodes Could not find AnimateDiff nodes Could not find IPAdapter nodes Could not find VideoHelperSuite nodes Could not load ImpactPack nodes Could not find ImpactPack nodes /home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/timm/models/registry.py:4: FutureWarning: Importing from timm.models.registry is deprecated, please import via timm.models warnings.warn(f"Importing from {name} is deprecated, please import via timm.models", FutureWarning) /home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/timm/models/helpers.py:7: FutureWarning: Importing from timm.models.helpers is deprecated, please import via timm.models warnings.warn(f"Importing from {name} is deprecated, please import via timm.models", FutureWarning) /home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/transparent_background/gui.py:24: UserWarning: Failed to import flet. Ignore this message when you do not need GUI mode. warnings.warn('Failed to import flet. Ignore this message when you do not need GUI mode.')

Loading: ComfyUI-Impact-Pack (V8.22.2)

[Impact Pack] Wildcards loading done.

Comfyroll Studio v1.76 : 175 Nodes Loaded

** For changes, please see patch notes at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/blob/main/Patch_Notes.md ** For help, please see the wiki at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki

Import times for custom nodes: 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/websocket_image_save.py 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyLiterals 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/wlsh_nodes 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-inpaint-cropandstitch 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-enricos-nodes 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-custom-scripts 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui_essentials 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-browser 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/derfuu_comfyui_moddednodes 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-KJNodes 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-MultiGPU 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui_birefnet_ll 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/kaytool 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-art-venture 0.0 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-florence2 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/teacache 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/Crystools 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/controlnet_aux 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-inspyrenet-rembg 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui_layerstyle 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/Easy-Use 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-videohelpersuite 0.1 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-advancedliveportrait 0.2 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-impact-pack 0.3 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-GIMM-VFI 0.5 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/rgthree-comfy 1.3 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-nunchaku 1.6 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/was-node-suite-comfyui 1.9 seconds: /home/8TDisk/sd/ComfyUI/custom_nodes/comfyui-supir

Context impl SQLiteImpl. Will assume non-transactional DDL. No target revision found. Starting server

To see the GUI go to: http://127.0.0.1:8188 [ComfyUI-Manager] Failed to perform initial fetching 'alter-list.json': Connection timeout to host https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json Traceback (most recent call last): File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1268, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohappyeyeballs/impl.py", line 87, in start_connection sock, _, _ = await _staggered.staggered_race( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohappyeyeballs/_staggered.py", line 165, in staggered_race done = await _wait_one( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohappyeyeballs/_staggered.py", line 46, in _wait_one return await wait_next asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 725, in _connect_and_send_request conn = await self._connector.connect( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 642, in connect proto = await self._create_connection(req, traces, timeout) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1209, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1581, in _create_direct_connection raise last_exc File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1550, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1265, in _wrap_create_connection async with ceil_timeout( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/async_timeout/init.py", line 179, in aexit self._do_exit(exc_type) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/async_timeout/init.py", line 265, in _do_exit raise asyncio.TimeoutError asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py", line 1735, in get_cache json_obj = await manager_util.get_data(uri, True) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_util.py", line 145, in get_data async with session.get(uri, headers=headers) as resp: File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 1488, in aenter self._resp: _RetType = await self._coro File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 770, in _request resp = await handler(req) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 729, in _connect_and_send_request raise ConnectionTimeoutError( aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json [ComfyUI-Manager] Failed to perform initial fetching 'custom-node-list.json': Connection timeout to host https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json Traceback (most recent call last): File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1268, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohappyeyeballs/impl.py", line 87, in start_connection sock, _, _ = await _staggered.staggered_race( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohappyeyeballs/_staggered.py", line 165, in staggered_race done = await _wait_one( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohappyeyeballs/_staggered.py", line 46, in _wait_one return await wait_next asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 725, in _connect_and_send_request conn = await self._connector.connect( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 642, in connect proto = await self._create_connection(req, traces, timeout) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1209, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1581, in _create_direct_connection raise last_exc File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1550, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/connector.py", line 1265, in _wrap_create_connection async with ceil_timeout( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/async_timeout/init.py", line 179, in aexit self._do_exit(exc_type) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/async_timeout/init.py", line 265, in _do_exit raise asyncio.TimeoutError asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py", line 1735, in get_cache json_obj = await manager_util.get_data(uri, True) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_util.py", line 145, in get_data async with session.get(uri, headers=headers) as resp: File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 1488, in aenter self._resp: _RetType = await self._coro File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 770, in _request resp = await handler(req) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 729, in _connect_and_send_request raise ConnectionTimeoutError( aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [ComfyUI-Manager] Failed to perform initial fetching 'github-stats.json': Traceback (most recent call last): File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 532, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/streams.py", line 672, in read await self._waiter asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py", line 1735, in get_cache json_obj = await manager_util.get_data(uri, True) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_util.py", line 145, in get_data async with session.get(uri, headers=headers) as resp: File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 1488, in aenter self._resp: _RetType = await self._coro File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 770, in _request resp = await handler(req) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 748, in _connect_and_send_request await resp.start(conn) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 527, in start with self._timer: File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/helpers.py", line 685, in exit raise asyncio.TimeoutError from exc_val asyncio.exceptions.TimeoutError [ComfyUI-Manager] Failed to perform initial fetching 'extension-node-map.json': Traceback (most recent call last): File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 532, in start message, payload = await protocol.read() # type: ignore[union-attr] File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/streams.py", line 672, in read await self._waiter asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py", line 1735, in get_cache json_obj = await manager_util.get_data(uri, True) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_util.py", line 145, in get_data async with session.get(uri, headers=headers) as resp: File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 1488, in aenter self._resp: _RetType = await self._coro File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 770, in _request resp = await handler(req) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client.py", line 748, in _connect_and_send_request await resp.start(conn) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 527, in start with self._timer: File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/aiohttp/helpers.py", line 685, in exit raise asyncio.TimeoutError from exc_val asyncio.exceptions.TimeoutError FETCH ComfyRegistry Data: 5/96 FETCH ComfyRegistry Data: 10/96 FETCH ComfyRegistry Data: 15/96 FETCH ComfyRegistry Data: 20/96 FETCH ComfyRegistry Data: 25/96 FETCH ComfyRegistry Data: 30/96 FETCH ComfyRegistry Data: 35/96 FETCH ComfyRegistry Data: 40/96 FETCH ComfyRegistry Data: 45/96 FETCH ComfyRegistry Data: 50/96 FETCH ComfyRegistry Data: 55/96 FETCH ComfyRegistry Data: 60/96 FETCH ComfyRegistry Data: 65/96 FETCH ComfyRegistry Data: 70/96 FETCH ComfyRegistry Data: 75/96 FETCH ComfyRegistry Data: 80/96 FETCH ComfyRegistry Data: 85/96 FETCH ComfyRegistry Data: 90/96 Cannot connect to comfyregistry. FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE] [ComfyUI-Manager] All startup tasks have been completed. got prompt [MultiGPU] WanVideo T5 Text encoder loaded on cpu T5Encoder: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 24/24 [07:11<00:00, 17.96s/it] T5Encoder: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 24/24 [06:58<00:00, 17.44s/it] [MultiGPU] WanVideo TextEncode completed on cpu [MultiGPU] WanVideo VAE loaded on cuda:0 [MultiGPU] WanVideoBlockSwap configuration complete CUDA Compute Capability: 8.9 Detected model in_channels: 36 Model cross attention type: t2v, num_heads: 40, num_layers: 40 Model variant detected: 14B model_type FLOW [MultiGPU] WanVideo model loaded on cuda:0 Loading LoRA: Wan22-Lightning/Wan2.2-Lightning_I2V-A14B-4steps-lora_HIGH_fp16 with strength: 3.0 [MultiGPU] WanVideoSampler: Processing on device: cuda:0 Using accelerate to load and assign model weights to device... Loading transformer parameters to cuda:0: 100%|████████████████████████████████████████████████████████████████████████████████████| 1095/1095 [00:03<00:00, 317.33it/s] Using 400 LoRA weight patches for WanVideo model ------- Scheduler info ------- Total timesteps: tensor([999, 975, 941, 888, 799, 615], device='cuda:0') Using timesteps: tensor([999, 975, 941], device='cuda:0') Using sigmas: tensor([1.0000, 0.9756, 0.9412, 0.8889])

sigmas: tensor([1.0000, 0.9756, 0.9412, 0.8889]) Received 6 cfg values, but only 3 steps. Slicing cfg list to match steps. Using per-step cfg list: [2.0, 1.0, 1.0] image_cond shape: torch.Size([20, 21, 100, 136]) Input sequence length: 71400 Sampling 81 frames at 1088x800 with 3 steps 0%| | 0/3 [00:00<?, ?it/s]Error during model prediction: Allocation on device 0%| | 0/3 [00:11<?, ?it/s] Error during sampling: Allocation on device !!! Exception during processing !!! Allocation on device Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/execution.py", line 496, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "/home/8TDisk/sd/ComfyUI/execution.py", line 315, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "/home/8TDisk/sd/ComfyUI/execution.py", line 289, in _async_map_node_over_list await process_inputs(input_dict, i) File "/home/8TDisk/sd/ComfyUI/execution.py", line 277, in process_inputs result = f(**inputs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-MultiGPU/wanvideo.py", line 385, in process return original_sampler.process(model, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 3961, in process raise e File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 3857, in process noise_pred, self.cache_state = predict_with_cfg( File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 2860, in predict_with_cfg raise e File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 2761, in predict_with_cfg noise_pred_cond, cache_state_cond = transformer( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 2475, in forward x, x_ip = block(x, x_ip=x_ip, **kwargs) #run block File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 655, in _fn return fn(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 917, in forward shift_msa, scale_msa, gate_msa, shift_mlp, scale_mlp, gate_mlp = self.get_mod(e.to(x.device)) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 963, in torch_dynamo_resume_in_forward_at_917 q, k, v = self.self_attn.qkv_fn(input_x) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1018, in torch_dynamo_resume_in_forward_at_963 y = self.self_attn.forward(q, k, v, seq_lens) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1050, in torch_dynamo_resume_in_forward_at_1018 x = self.cross_attn_ffn(x, context, grid_sizes, shift_mlp, scale_mlp, gate_mlp, clip_embed, File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1075, in cross_attn_ffn x = x + self.cross_attn(self.norm3(x), context, grid_sizes, clip_embed=clip_embed, File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1103, in torch_dynamo_resume_in_cross_attn_ffn_at_1075 y = self.ffn(torch.addcmul(shift_mlp, norm2_x, 1 + scale_mlp)) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/container.py", line 240, in forward input = module(input) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/custom_linear.py", line 92, in forward weight = self.apply_lora(weight).to(self.compute_dtype) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/custom_linear.py", line 92, in torch_dynamo_resume_in_forward_at_92 weight = self.apply_lora(weight).to(self.compute_dtype) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 838, in _fn return fn(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1209, in forward return compiled_fn(full_args) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 328, in runtime_wrapper all_outs = call_func_at_runtime_with_args( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/utils.py", line 126, in call_func_at_runtime_with_args out = normalize_as_list(f(args)) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 689, in inner_fn outs = compiled_fn(args) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 495, in wrapper return compiled_fn(runtime_args) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_inductor/output_code.py", line 460, in call return self.current_callable(inputs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_inductor/utils.py", line 2404, in run return model(new_inputs) File "/tmp/torchinductor_root/av/cav4zjkgcn75pbmvoyiwhku4fzug6dr4gacpsa42rmhipiikxnsq.py", line 42, in call buf0 = empty_strided_cuda((71400, 13824), (13824, 1), torch.float16) torch.OutOfMemoryError: Allocation on device

Got an OOM, unloading all loaded models. Prompt executed in 00:16:03 got prompt [MultiGPU] WanVideoBlockSwap configuration complete Loading LoRA: Wan22-Lightning/Wan2.2-Lightning_I2V-A14B-4steps-lora_HIGH_fp16 with strength: 3.0 [MultiGPU] WanVideoSampler: Processing on device: cuda:0 Using accelerate to load and assign model weights to device... Loading transformer parameters to cuda:0: 100%|████████████████████████████████████████████████████████████████████████████████████| 1095/1095 [00:05<00:00, 193.49it/s] Using 400 LoRA weight patches for WanVideo model ------- Scheduler info ------- Total timesteps: tensor([999, 975, 941, 888, 799, 615], device='cuda:0') Using timesteps: tensor([999, 975, 941], device='cuda:0') Using sigmas: tensor([1.0000, 0.9756, 0.9412, 0.8889])

sigmas: tensor([1.0000, 0.9756, 0.9412, 0.8889]) Received 6 cfg values, but only 3 steps. Slicing cfg list to match steps. Using per-step cfg list: [2.0, 1.0, 1.0] image_cond shape: torch.Size([20, 21, 100, 136]) Input sequence length: 71400 Sampling 81 frames at 1088x800 with 3 steps 0%| | 0/3 [00:00<?, ?it/s]Error during model prediction: Allocation on device 0%| | 0/3 [00:00<?, ?it/s] Error during sampling: Allocation on device !!! Exception during processing !!! Allocation on device Traceback (most recent call last): File "/home/8TDisk/sd/ComfyUI/execution.py", line 496, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "/home/8TDisk/sd/ComfyUI/execution.py", line 315, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs) File "/home/8TDisk/sd/ComfyUI/execution.py", line 289, in _async_map_node_over_list await process_inputs(input_dict, i) File "/home/8TDisk/sd/ComfyUI/execution.py", line 277, in process_inputs result = f(**inputs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-MultiGPU/wanvideo.py", line 385, in process return original_sampler.process(model, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 3961, in process raise e File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 3857, in process noise_pred, self.cache_state = predict_with_cfg( File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 2860, in predict_with_cfg raise e File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes.py", line 2761, in predict_with_cfg noise_pred_cond, cache_state_cond = transformer( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 2475, in forward x, x_ip = block(x, x_ip=x_ip, **kwargs) #run block File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 655, in _fn return fn(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 917, in forward shift_msa, scale_msa, gate_msa, shift_mlp, scale_mlp, gate_mlp = self.get_mod(e.to(x.device)) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 963, in torch_dynamo_resume_in_forward_at_917 q, k, v = self.self_attn.qkv_fn(input_x) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1018, in torch_dynamo_resume_in_forward_at_963 y = self.self_attn.forward(q, k, v, seq_lens) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1050, in torch_dynamo_resume_in_forward_at_1018 x = self.cross_attn_ffn(x, context, grid_sizes, shift_mlp, scale_mlp, gate_mlp, clip_embed, File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1075, in cross_attn_ffn x = x + self.cross_attn(self.norm3(x), context, grid_sizes, clip_embed=clip_embed, File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 1103, in torch_dynamo_resume_in_cross_attn_ffn_at_1075 y = self.ffn(torch.addcmul(shift_mlp, norm2_x, 1 + scale_mlp)) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/container.py", line 240, in forward input = module(input) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl return forward_call(*args, **kwargs) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/custom_linear.py", line 92, in forward weight = self.apply_lora(weight).to(self.compute_dtype) File "/home/8TDisk/sd/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/custom_linear.py", line 92, in torch_dynamo_resume_in_forward_at_92 weight = self.apply_lora(weight).to(self.compute_dtype) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 838, in _fn return fn(*args, **kwargs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1209, in forward return compiled_fn(full_args) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 328, in runtime_wrapper all_outs = call_func_at_runtime_with_args( File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/utils.py", line 126, in call_func_at_runtime_with_args out = normalize_as_list(f(args)) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 689, in inner_fn outs = compiled_fn(args) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 495, in wrapper return compiled_fn(runtime_args) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_inductor/output_code.py", line 460, in call return self.current_callable(inputs) File "/home/8TDisk/miniconda3/envs/comfy1/lib/python3.10/site-packages/torch/_inductor/utils.py", line 2404, in run return model(new_inputs) File "/tmp/torchinductor_root/av/cav4zjkgcn75pbmvoyiwhku4fzug6dr4gacpsa42rmhipiikxnsq.py", line 42, in call buf0 = empty_strided_cuda((71400, 13824), (13824, 1), torch.float16) torch.OutOfMemoryError: Allocation on device

Got an OOM, unloading all loaded models. Prompt executed in 7.25 seconds `

suheming avatar Sep 01 '25 13:09 suheming

It seems that force offload on these blocks stopped working and that causes OOM -

WAN video wraper 1.3.3 MultiGPU 2.4.1

Image

I've re-tested it on original wan workflow (single GPU) and there model in between wan 2.2 low noise and high noise properly unloads.

This seems to be causing OOM inside multiGPU workflow.

Unloading visible on the GPU tab -

Image

lukas-sieber avatar Sep 06 '25 18:09 lukas-sieber

WanVideoWrapper has made changes to how models are loaded and unloaded recently. Previously working workflows OOMing on the stock nodes has been occurring as well. Looking like its possibly fixed in the current version, though I have not been able to get my own env working again yet.

https://github.com/kijai/ComfyUI-WanVideoWrapper/issues/1125

Edit: I was able to get the stock WanVideoWrapper v1.3.3 nodes to work after updating ComfyUI to v0.3.57 and clearing the Triton cache (that part might not have been fully necessary). A multiGPU'd version of example wanvideo2_2_I2V_A14B_example_WIP workflow still OOMs when loading the low model, behavior looks similar to what the stock nodes were doing prior to 1.3.3 where the high model was not being unloaded (I believe).

without-ordinary avatar Sep 09 '25 06:09 without-ordinary

@suheming, @without-ordinary, @lukas-sieber,

I realize some time has passed since I have been able to address the out-of-sync issue on WanVideoWrapper. It is an active code base, but most of the changes around how device is being used appear to be settled down. I have made some changes to exactly how the nodes are implemented, but the examples should show how the new device linkage works.

Image

Please, if any of you are interested in testing the new nodes, please provide feedback.

I'll keep this issue open at least a few days longer to capture any questions or issues with the latest release.

Thank you for your patience.

Cheers!

pollockjj avatar Oct 10 '25 20:10 pollockjj