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

about the Color manipulation. #3

Open
segatecm opened this issue Jun 13, 2023 · 1 comment
Open

about the Color manipulation. #3

segatecm opened this issue Jun 13, 2023 · 1 comment

Comments

@segatecm
Copy link

Hi @inbarhub , thanks for your greate work.
Can you give some code about the Color manipulation in your paper?
Thanks again!

@inbarhub
Copy link
Owner

inbarhub commented Aug 7, 2023

Since the color manipulation is done in the pixel-space mode (and not in the latent space as done with the text), we won't publish the entire code. But here is the part of the code we use:
From the given mask we created a binary mask which is just applying a threshold. Then, for every t, we changed z[t] as follows:
x0_prediction = (out["pred_xstart"]+1)/2 #the x_0 prediction in the current timestep after changing it to be in [0,1] range
z[t] = (1-mask_binary)z[t]+mask_binary(z[t]+alpha*(mask.unsqueeze(0)-x0_prediction)) #color-mask

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