-
Notifications
You must be signed in to change notification settings - Fork 17
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
Could the author share the code for calculating the model parameters(Param.) and the model computational complexity(MACs) of the pipeline. #53
Comments
Hi, we've added the code and please run: pip install thop==0.1.1.post2209072238
python src/count_macs_params.py Click for the results:== CompVis/stable-diffusion-v1-4 | 512x512 img generation == == nota-ai/bk-sdm-base | 512x512 img generation == == nota-ai/bk-sdm-small | 512x512 img generation == == nota-ai/bk-sdm-tiny | 512x512 img generation == == runwayml/stable-diffusion-v1-5 | 512x512 img generation == == stabilityai/stable-diffusion-2-1-base | 512x512 img generation == == stabilityai/stable-diffusion-2-1 | 768x768 img generation == |
We followed the author code for testing, and the experimental results show that the results of MACs differ too much from the paper. == CompVis/stable-diffusion-v1-4 | 512x512 img generation == |
We obtained the results below with the refactored and uploaded code, which are identical to those presented in our paper.
Could you share the output of |
2 . the version is same as you.
How to control the sample step? The code as follows: @@ -0,0 +1,62 @@------------------------------------------------------------------------------------Copyright 2024. Nota Inc. All Rights Reserved.------------------------------------------------------------------------------------import torch def count_params(model): def get_macs_params(model_id, img_size=512, txt_emb_size=768, device="cuda", batch_size=1):
if name == "main":
|
1 - Thanks for checking. 2 - Umm, when we did
the log we obtained
pip show thop
pip show diffusers
|
if img_size/8, is 0.2G I think the version of thop and diffuers is same with you, but the MACs og my UNet for "runwayml/stable-diffusion-v1-5" is -> the output of pip show thop -> the output of pip show diffusers == CompVis/stable-diffusion-v1-4 | 512x512 img generation == |
We didn't get this point. We think that the division by 8 ("/8") is correctly considered in our code.
Futhermore, if we changed
Thanks for your check. Unfortunately, we are unsure if we can provide further assistance at this moment, as we were not able to reproduce the issue you described. |
Could the author share the code for calculating the model parameters(Param.) and the model computational complexity(MACs) of the pipeline. very thank you!
The text was updated successfully, but these errors were encountered: