DiffSynth-Studio icon indicating copy to clipboard operation
DiffSynth-Studio copied to clipboard

OutOfMemoryError: CUDA out of memory. Tried to allocate 480.00 MiB. GPU

Open Hing-Hing-Zone-Zone opened this issue 1 year ago • 3 comments

Hello ~ I got this error when doing Video Creator... How can I solve this out?

Loading videos ...

Loading videos ... done!

Loading models ...

Loading models ... done!

Synthesizing videos ...

OutOfMemoryError: CUDA out of memory. Tried to allocate 480.00 MiB. GPU Traceback: File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "C:\AI\DiffSynth-Studio\pages\2_Video_Creator.py", line 197, in SDVideoPipelineRunner(in_streamlit=True).run(config) File "C:\AI\DiffSynth-Studio\diffsynth\pipelines\stable_diffusion_video.py", line 349, in run output_video = self.synthesize_video(model_manager, pipe, config["pipeline"]["seed"], smoother, **config["pipeline"]["pipeline_inputs"]) File "C:\AI\DiffSynth-Studio\diffsynth\pipelines\stable_diffusion_video.py", line 296, in synthesize_video output_video = pipe(**pipeline_inputs, smoother=smoother, progress_bar_st=progress_bar_st) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "C:\AI\DiffSynth-Studio\diffsynth\pipelines\stable_diffusion_video.py", line 221, in call noise_pred_posi = lets_dance_with_long_video( File "C:\AI\DiffSynth-Studio\diffsynth\pipelines\stable_diffusion_video.py", line 38, in lets_dance_with_long_video hidden_states_batch = lets_dance( File "C:\AI\DiffSynth-Studio\diffsynth\pipelines\dancer.py", line 93, in lets_dance hidden_states, time_emb, text_emb, res_stack = motion_modules.motion_modules[motion_module_id]( File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "C:\AI\DiffSynth-Studio\diffsynth\models\sd_motion.py", line 82, in forward hidden_states = block( File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "C:\AI\DiffSynth-Studio\diffsynth\models\sd_motion.py", line 45, in forward ff_output = self.act_fn(norm_hidden_states) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "C:\AI\DiffSynth-Studio\diffsynth\models\sd_unet.py", line 27, in forward hidden_states, gate = self.proj(hidden_states).chunk(2, dim=-1) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\linear.py", line 116, in forward return F.linear(input, self.weight, self.bias)

Hing-Hing-Zone-Zone avatar Jul 01 '24 23:07 Hing-Hing-Zone-Zone

You need more GPU VRAM. Or reduce the resolution.

Artiprocher avatar Jul 04 '24 02:07 Artiprocher

You need more GPU VRAM. Or reduce the resolution.

Thank you~ I reduce the resolution then it's working

Hing-Hing-Zone-Zone avatar Jul 04 '24 21:07 Hing-Hing-Zone-Zone

分辨率怎么降低

memoral265 avatar Jul 13 '24 05:07 memoral265