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 add clip loss in Guidence part for stable diffusion latent ? #25

Closed
marson666 opened this issue Dec 8, 2022 · 1 comment
Closed

Comments

@marson666
Copy link

Hi, thanks for your great work.

I'm trying to add clip loss for stable diffusion latent in the Guidence part, but when i decode image from latent and put it into clip_model, when cal clip_loss with latent, it occurs an error, RuntimeError: One of the differentiated Tensors appears to not have been used in the graph. Set allow_unused=True if this is the desired behavior. How to fix this problem or is there any example to refer?

@johnowhitaker
Copy link
Collaborator

There is a community example showing CLIP guidance here that should help: https://github.com/huggingface/diffusers/blob/main/examples/community/clip_guided_stable_diffusion.py

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