Yujun-Shi / DragDiffusion

[CVPR2024, Highlight] Official code for DragDiffusion
https://yujun-shi.github.io/projects/dragdiffusion.html
Apache License 2.0
1.15k stars 86 forks source link

for different aspect ratios,run error #29

Closed gaoshangle closed 1 year ago

gaoshangle commented 1 year ago

https://github.com/Yujun-Shi/DragDiffusion/blob/00ca94ac1fa5cf80f013758c7c919cc8767d2710/utils/ui_utils.py#L277C22-L277C22

This line of code up here, made some changes as follows:

   save_result = torch.cat([
    source_image * 0.5 + 0.5,
    torch.ones((1,3,25, 512)).cuda(),
    image_with_clicks * 0.5 + 0.5,
    torch.ones((1,3,25, 512)).cuda(),
    gen_image[0:1]
], dim=-2)

now, the program works normally Is that correct ?? thanks

Yujun-Shi commented 1 year ago

image hello, here is the correct way to do it. Already fixed in my latest commit. Thanks!

gaoshangle commented 1 year ago

error again, shape different

RuntimeError: Sizes of tensors must match except in dimension 3. Expected size 733 but got size 728 for tensor number 4 in the list.

image

Use this image to verify 20230905-143542

thanks

Yujun-Shi commented 1 year ago

image hello, I've updated the code, and it should be functioning normally, pls check :)

Yujun-Shi commented 1 year ago

And in this case, where the image is a bit complicated, you may train LoRA for a bit longer, say 300 steps. image

Yujun-Shi commented 1 year ago

I'm closing this issue for now, feel free to re-open if you have any other questions.

gaoshangle commented 1 year ago

OK fine thanks