modelscope / DiffSynth-Studio

Enjoy the magic of Diffusion models!
Apache License 2.0
6.31k stars 563 forks source link

RuntimeError: The size of tensor a (128) must match the size of tensor b (90) at non-singleton dimension 3 #109

Open Walfy-sjl opened 1 month ago

Walfy-sjl commented 1 month ago

Traceback (most recent call last): File "F:\Code\Python\Diffutoon01\DiffSynth-Studio\sd_toon_shading.py", line 57, in output_video = pipe( ^^^^^ File "F:\Code\Venv\diffutoon\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "F:\Code\Python\Diffutoon01\DiffSynth-Studio\diffsynth\pipelines\stable_diffusion_video.py", line 221, in call noise_pred_posi = lets_dance_with_long_video( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Code\Python\Diffutoon01\DiffSynth-Studio\diffsynth\pipelines\stable_diffusion_video.py", line 38, in lets_dance_with_long_video hidden_states_batch = lets_dance( ^^^^^^^^^^^ File "F:\Code\Python\Diffutoon01\DiffSynth-Studio\diffsynth\pipelines\dancer.py", line 34, in lets_dance res_stack = controlnet( ^^^^^^^^^^^ File "F:\Code\Python\Diffutoon01\DiffSynth-Studio\diffsynth\controlnets\controlnet_unit.py", line 44, in call resstack = model( ^^^^^^ File "F:\Code\Venv\diffutoon\Lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Code\Venv\diffutoon\Lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Code\Python\Diffutoon01\DiffSynth-Studio\diffsynth\models\sd_controlnet.py", line 108, in forward hidden_states = self.conv_in(sample) + self.controlnet_conv_in(conditioning)


RuntimeError: The size of tensor a (128) must match the size of tensor b (90) at non-singleton dimension 3
Walfy-sjl commented 1 month ago

输出视频的时候报错,大家知道是什么问题吗

Artiprocher commented 1 month ago

我推测,你输入的视频分辨率和填入的 height width 等参数不一致,请检查