-
Notifications
You must be signed in to change notification settings - Fork 55
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
Memory Requirements #6
Comments
On a 24gb 3090 I have seen it hit a bit over 18gb with complex prompts. |
Hi @aisagarw, thanks for your interest! |
Sure! Following are the exact details:
I actually didn't change any of the default values in the code (explain.ipynb) apart from the prompt and corresponding subject tokens (elephant, crown and man in the above example) . Thanks much for your response! |
thanks @aisagarw, it seems that your prompt ("an elephant with a crown standing next to a man") probably resides outside the distribution that SD has learned for textual descriptions (see the limitations section of our paper). This triggers the iterative refinement for the maximal number of steps which increases the memory consumption beyond 16gb. |
Thanks much for your insights and response. But one observation I had was, that for the same prompt as mentioned above, the training went fine when only elephant and crown were the two subject tokens. Whereas, in case where 3 subject tokens namely elephant, crown and man were given, the above mentioned memory issue occurred. Is it maybe that the optimization becomes difficult when there are multiple neglected subject tokens? |
of course @aisagarw, happy to help. this actually supports my previous claim- elephant + crown is in distribution therefore the method works, and the iterative refinement is not even activated so the memory consumption is ok ("man" is not highlighted, i.e., not enforced by the method and can be ignored). when you add the demand to generate the man- the model struggles, iterative refinement is applied (to the token "man") and the memory consumption increases. |
I have been running the notebooks on a 16GB t4. In some cases, it runs well. But in some other cases (the observation is that loss values don't seem to go down much over iterations in many such cases), it throws up CUDA out of memory error in between the iterations itself. Why is it the case that it works well for the same number of iterations for certain prompts but not for others?
For instance, it works fine for a prompt like a cow and dog standing with a cat . But at the same time, for prompts like a boy cutting a birthday cake wearing a hat and an elephant with a crown standing next to a man, it throws memory errors within around 10 iterations. (The italics represent the subjects)
Am I missing something? What can be the probable reasons behind something like this?
The text was updated successfully, but these errors were encountered: