Skip to content

RuntimeError: The size of tensor a (32) must match the size of tensor b (16) at non-singleton dimension 2 #41

@TongrongHuang

Description

@TongrongHuang
Traceback (most recent call last):
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/gradio/queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/gradio/blocks.py", line 2047, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/gradio/blocks.py", line 1594, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/gradio/utils.py", line 869, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/gradio/utils.py", line 869, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/group_share/CogVideo/inference/gradio_composite_demo/cogstudio.py", line 731, in generate
    latents, seed = infer(
                    ^^^^^^
  File "/group_share/CogVideo/inference/gradio_composite_demo/cogstudio.py", line 265, in infer
    video_pt = pipe(
               ^^^^^
  File "/root/.conda/envs/cogvideo/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/root/diffusers/src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py", line 733, in __call__
    latents, old_pred_original_sample = self.scheduler.step(
                                        ^^^^^^^^^^^^^^^^^^^^
  File "/root/diffusers/src/diffusers/schedulers/scheduling_dpm_cogvideox.py", line 411, in step
    pred_original_sample = (alpha_prod_t**0.5) * sample - (beta_prod_t**0.5) * model_output
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RuntimeError: The size of tensor a (32) must match the size of tensor b (16) at non-singleton dimension 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions