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

Add direct target editing to the notebook #18

Open
tugot17 opened this issue Oct 9, 2022 · 1 comment
Open

Add direct target editing to the notebook #18

tugot17 opened this issue Oct 9, 2022 · 1 comment

Comments

@tugot17
Copy link

tugot17 commented Oct 9, 2022

It would be great to have a direct target editing in the notebook examples. Something like:
obraz

Code for this:

#https://lexica.art/prompt/2127efd3-e23b-44dc-baac-494993bc9688
image = stablediffusion("A photo of a Corgi dog riding a bike in Times Square wearing sunglasses and beach hat, cinestill, 800t, 35mm, full-HD",
                        seed=2401809524,
                        guidance_scale=7,
                        steps = 150)
image
prompt = "A photo of a teddy bear riding a bike in Times Square wearing sunglasses and beach hat, cinestill, 800t, 35mm, full-HD"

print(prompt_token(prompt, 5), prompt_token(prompt, 6))

stablediffusion(prompt,
                        seed=2401809524,
                        guidance_scale=7,
                        prompt_edit_token_weights = [(5, 5), (6, 5)],
                        init_image=image,
                        steps=150)
@bloc97
Copy link
Owner

bloc97 commented Oct 9, 2022

Thanks for the suggestion, I will try to improve the code and add more examples to the notebook eventually. Right now I am focused on completing the implementation from the paper (a small section at the end is not yet implemented) and making it compatible with diffusers==0.4.0, but feel free to send a pull request if you would like to work on this.

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