Skip to content

A occasional issue that Tensor size do not match #10

@XuanjiaZ

Description

@XuanjiaZ

While evaluating InstantDrag on the DragBench Dataset, an issue occurred when processing an image located at "DragBench/art_work/PJC_2023-09-15-1052-01".
The detail error info as follows:

Traceback (most recent call last):
  File "/home/InstantDrag-main/demo/run_drag_diffusion_instantdrag.py", line 120, in <module>
    out_image = pipeline.run(original_image,
  File "/home/InstantDrag-main/demo/demo_utils.py", line 240, in run
    edited_image = self.drag(original_image, selected_points, save_results)
  File "/home/InstantDrag-main/demo/demo_utils.py", line 200, in drag
    edited_image = self.flowdiffusion(**kwargs).images[0]
  File "/root/miniconda3/envs/instantdrag/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/InstantDrag-main/demo/../flowdiffusion/pipeline.py", line 247, in __call__
    image_latents = self.prepare_image_latents(
  File "/home/InstantDrag-main/demo/../flowdiffusion/pipeline.py", line 470, in prepare_image_latents
    image_latents_flow_cond = torch.cat([image_latents, flow.to(device)], dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 63 but got size 64 for tensor number 1 in the list.

Other images prior to this one were successfully dragged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions