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

gradio app.py error #2

Open
HarshadDolas07 opened this issue Mar 11, 2024 · 2 comments
Open

gradio app.py error #2

HarshadDolas07 opened this issue Mar 11, 2024 · 2 comments

Comments

@HarshadDolas07
Copy link

Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 5 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 1024 and using 5 heads.
making attention of type 'vanilla-xformers' with 512 in_channels
building MemoryEfficientAttnBlock with 512 in_channels...
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla-xformers' with 512 in_channels
building MemoryEfficientAttnBlock with 512 in_channels...
--- using zero snr---
/home/harshad/Downloads/CRM/imagedream/ldm/interface.py:117: RuntimeWarning: divide by zero encountered in divide
"sqrt_recip_alphas_cumprod", to_torch(np.sqrt(1.0 / alphas_cumprod))
/home/harshad/Downloads/CRM/imagedream/ldm/interface.py:120: RuntimeWarning: divide by zero encountered in divide
"sqrt_recipm1_alphas_cumprod", to_torch(np.sqrt(1.0 / alphas_cumprod - 1))
Killed

After some time, while running the code, I encountered a 'divide by zero' error. It seems to occur during a division operation, which is likely causing the program to terminate unexpectedly. I suspect there might be an issue with the calculations or data processing logic in the code. The error message indicates that a division by zero was encountered, which is mathematically undefined. Could you please provide guidance on how to resolve this issue?

@thuwzy
Copy link
Collaborator

thuwzy commented Mar 11, 2024

We use Zero SNR trick, which means that at maximum timestep the noise to signal ratio will be 1.0/0.0. However, in general the maximum step will not be used. How do you set the sampling timesteps of DDIM? Do you set as the default 50 steps?

@HarshadDolas07
Copy link
Author

HarshadDolas07 commented Mar 12, 2024

We use Zero SNR trick, which means that at maximum timestep the noise to signal ratio will be 1.0/0.0. However, in general the maximum step will not be used. How do you set the sampling timesteps of DDIM? Do you set as the default 50 steps?

I did not made any changes to the parameters, so I believe the default value for the sampling timesteps is being used.

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