-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Community Pipeline] Imagic: Text-Based Real Image Editing with Diffusion Models #895
Comments
Would love to see this added, notebook implementation here for reference https://github.com/justinpinkney/stable-diffusion/blob/main/notebooks/imagic.ipynb |
I would like to work on this |
Awesome @asofiaoliveira ! Feel free to open a PR and to attach it here |
tried my hand at this here: #958 please let me know if there's any comments! |
I guess I'll leave it to @MarkRich then 😅 |
FYI, it looks like that PR has been merged now: And the implementation is available here: Can this issue be closed now? |
Is there someone try the effect with this code? I failed to achieve the effect in the paper (for example, let a doy playing with a toy) with the Imagic Stable Diffusion. |
@0xdevalias It seems there is some issue with the implementation? In train(), the text embedding is optimized first. But prior to that, unet and text_encoder are set to disable BP:
Does this mean there won't be valid gradients back propagated from the loss to the text embedding? |
@askerlee I don't know anything about the implementation, nor really used it. I just noticed the PR and figured I'd link it here |
@njucckevin I also get wrong results. Can anyone give me some hints? |
I also cannot reproduce the result in the paper |
I am using stable diffusion to replicate their result on imagen(non open source) and used 500 optimisation steps and 1000 fine-tuning steps. The best result come from the last picture where we have lambda coefficient of 1. Not quite sure why the change comes so late. |
I am getting the exact same problem. What is the solution to this? |
I am also facing this problem. When I set anything below 1 for lambda coefficient, I get an image that is the same as the input image. If I change the coefficient by more than 1 then I get an image of a random bird spreading its wing. |
Hi @Kathy-Peng I am also following the same config and my code is written as below. Could you kindly confirm if there is any missing step in this. In my results, the edited image also doesn't change much even at lambda coefficient = 1.1
|
Was anyone able to reproduce the results? |
@HashmatShadab @njucckevin @BoyuanJiang @ShaoTengLiu @1702609 @shwetabhardwaj44 Please check out my new paper Forgedit, which is much faster than Imagic and edting results are way much better than Imagic with Stable Diffusion. https://github.com/witcherofresearch/Forgedit/ |
Intro
Community Pipelines are introduced in
diffusers==0.4.0
with the idea of allowing the community to quickly add, integrate, and share their custom pipelines on top ofdiffusers
.You can find a guide about Community Pipelines here. You can also find all the community examples under
examples/community/
. If you have questions about the Community Pipelines feature, please head to the parent issue.Idea: Imagic: Text-based Real Image Editing with Diffusion Models
This pipeline aims to implement this paper to Stable Diffusion, allowing for real-world image editing. Example from the paper:
The text was updated successfully, but these errors were encountered: