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

Is the WanVideo VRAM Management node working?

Open caslix opened this issue 1 year ago • 1 comments

An attempt to activate the WanVideo VRAM Management node results in an error: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.

caslix avatar Oct 30 '25 11:10 caslix

Validated and fixed on current branch with an A/B repro on the same workflow.

Reproduction (baseline)

  • MultiGPU commit: 674a790982e139026e7a3fe0e60c7afbb0988a10
  • Workflow: issue137_wanvideo_vram_management_gate.json
  • Result: failure reproduced with
    • Cannot copy out of meta tensor; no data!
    • trace in diffsynth/vram_management/layers.py (AutoWrappedModule.__init__, .to(...))

Fix

  • MultiGPU commit: 4cd02ed
  • File: wanvideo.py
  • Change: when vram_management_args is used, patch WanVideoWrapper VRAM-management wrapper init to handle meta modules via to_empty(device=...) before dtype cast.

Verification (post-fix)

  • Same workflow, same environment context.
  • Result: model loads and prompt completes successfully with VRAM management enabled.

If needed, I can open a PR with this patch and attach the A/B artifacts directly in the PR description.

pollockjj avatar Mar 11 '26 19:03 pollockjj