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

Where in the code is SDEdit? #18

Open
jmugan opened this issue Feb 16, 2024 · 3 comments
Open

Where in the code is SDEdit? #18

jmugan opened this issue Feb 16, 2024 · 3 comments

Comments

@jmugan
Copy link

jmugan commented Feb 16, 2024

Hi, love the project. I'm trying to run this on a custom dataset, and I can't see where the image is inserted into the diffusion process as described in equation 6 in the paper. I see the textual inversion but not that. Can someone point me to where that is? Thanks!

@brandontrabucco
Copy link
Owner

Hello Jonathan,

Thanks for your interest in our code! SDEdit is implemented inside the diffusers StableDiffusionImg2ImgPipeline class:
https://huggingface.co/docs/diffusers/v0.26.3/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline. The key arguments to this pipeline's call method for generation are image and strength, the latter of which controls the extent the images are modified.

This pipeline is used in the code for augmentation here:

-Brandon

@brandontrabucco
Copy link
Owner

brandontrabucco commented Feb 16, 2024

Also, when loading textual inversion embeddings, the diffusers Stable Diffusion pipelines will fail silently if a Textual Inversion embedding doesn't exist in the folder the code points to:

embeds_list = glob(embed_path + '/**/learned_embeds.bin')

Make sure to use the fine_tune_upstream.py script to train these embeddings first.

Let me know how else I can help!

-Brandon

@jmugan
Copy link
Author

jmugan commented Feb 20, 2024

Thanks! Still working through it.

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