aigc-apps / aigc-apps/VideoX-Fun

CogVideoX-Fun-V1.5-5B-InP图生视频失败,Got an OOM, unloading all loaded models.

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
188
Avg merge
2d 22h
Merged PRs (30d)
3

Description

L40S的GPU,显存48G,内存64G,使用comfyUI运行CogVideoX-Fun-V1.5-5B-InP 图生视频,
screenshot-20241217-140611
报错
!!! Exception during processing !!! Allocation on device

Traceback (most recent call last):

File "/app/ComfyUI/execution.py", line 324, in execute

 output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

File "/app/ComfyUI/execution.py", line 199, in get_output_data

 return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

File "/app/ComfyUI/execution.py", line 170, in _map_node_over_list

 process_inputs(input_dict, i)

File "/app/ComfyUI/execution.py", line 159, in process_inputs

 results.append(getattr(obj, func)(**inputs))

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/comfyui/comfyui_nodes.py", line 334, in process

 sample = pipeline(

File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context

 return func(*args, **kwargs)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/pipeline/pipeline_cogvideox_inpaint.py", line 1139, in call

 video = self.decode_latents(latents)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/pipeline/pipeline_cogvideox_inpaint.py", line 595, in decode_latents

 frames = self.vae.decode(latents).sample

File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/accelerate_utils.py", line 46, in wrapper

 return method(self, *args, **kwargs)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/models/autoencoder_magvit.py", line 1410, in decode

 decoded = self._decode(z).sample

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/models/autoencoder_magvit.py", line 1379, in _decode

 z_intermediate, conv_cache = self.decoder(z_intermediate, conv_cache=conv_cache)

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl

 return self._call_impl(*args, **kwargs)

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl

 return forward_call(*args, **kwargs)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/models/autoencoder_magvit.py", line 1053, in forward

 hidden_states, new_conv_cache[conv_cache_key] = up_block(

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl

 return self._call_impl(*args, **kwargs)

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl

 return forward_call(*args, **kwargs)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/models/autoencoder_magvit.py", line 730, in forward

 hidden_states, new_conv_cache[conv_cache_key] = resnet(

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl

 return self._call_impl(*args, **kwargs)

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl

 return forward_call(*args, **kwargs)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/models/autoencoder_magvit.py", line 374, in forward

 hidden_states, new_conv_cache["norm1"] = self.norm1(hidden_states, zq, conv_cache=conv_cache.get("norm1"))

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl

 return self._call_impl(*args, **kwargs)

File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl

 return forward_call(*args, **kwargs)

File "/app/ComfyUI/custom_nodes/CogVideoX-Fun/cogvideox/models/autoencoder_magvit.py", line 195, in forward

 new_f = norm_f * conv_y + conv_b

torch.OutOfMemoryError: Allocation on device

Got an OOM, unloading all loaded models.

Prompt executed in 196.79 seconds

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the CogVideoX-Fun-V1.5-5B-InP image-to-video run on the stated L40S hardware, then trace the failure from comfyui/comfyui_nodes.py:334 through pipeline_cogvideox_inpaint.py:595 and autoencoder_magvit.py:1379-1410. Compare memory use around VAE decoding and determine what change allows the workflow to complete without the reported allocation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.