DynamiCrafter icon indicating copy to clipboard operation
DynamiCrafter copied to clipboard

Arbitrary resolution

Open HyoKong opened this issue 1 year ago • 3 comments

Hi, thank you so much for your great work!

May I ask how to adapt to images with arbitrary resolutions, for instance, 512x768?

Thank you so much for your help!

HyoKong avatar Feb 08 '24 06:02 HyoKong

Hi Thanks for your interest! I am not sure how the model performs on the arbitrary resolution inputs. You can directly try it using both 512 model and 1024 model, and modify the input resolution in run.sh or run_mp.sh, i.e. --height ${H} --width $1 to the required height and width. I think the model still works to some extent in this way.

Doubiiu avatar Feb 08 '24 09:02 Doubiiu

Hi, adjusting height may be not working. there are bugs when concatenating the output of downsampling and upsampling blocks. The shapes do not match.

https://github.com/Doubiiu/DynamiCrafter/blob/ce86a1207494e11f7befda7bfb5235ea8f9d518e/lvdm/modules/networks/openaimodel3d.py#L596

Could you pls help to solve this issue?

HyoKong avatar Feb 18 '24 07:02 HyoKong

Hi, what is your exact resolution for inference? To my best knowledge, the height and width should be divided by 32 (I think this is the reason of your bug). And can you summarize the change of code for the target resolution inference?

Doubiiu avatar Feb 18 '24 07:02 Doubiiu