Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to modify the code to adapt to smaller size of input? #6

Open
abcdvzz opened this issue May 12, 2023 · 1 comment
Open

How to modify the code to adapt to smaller size of input? #6

abcdvzz opened this issue May 12, 2023 · 1 comment

Comments

@abcdvzz
Copy link

abcdvzz commented May 12, 2023

Hi there,

Thank you for your amazing work. The thing is I don't have A6000 GPUs at hand. So I modified the input size to 320x320 to adapt to the GPU memory. However, the result is terrible. I would like to know if there are specific settings I need to modify in the code. It seems that it should not relate to the input size. I have modified the 'int(512y1):int(512y2), int(512x1):int(512x2)' in the plms.py. Do I need to modify the 'v1-inferency.ymal' about stable diffusion? I also modify the learning rate in plms.py. Nothing works. Could you please tell me if there is anything I need to pay attention to?

Thank you very much.

@wuqiuche
Copy link
Collaborator

wuqiuche commented Oct 2, 2023

Hi abcdvzz,

Thank you for your interests in our work and sorry for the late reply. We have updated the code, which should have better efficiency, smaller memory cost (but still ~40 GB), and clearer structure. I believe "plms.py" should be the only script that needs to be changed. However, I guess it would also be a good idea to check the mask positions when changing the resolution. For this purpose, we implement a "plot" function within "ldm/modules/attention.py", which allows you to check the intermediate mask position and make sure they are at the correct positions after reshaping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants