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

Bad Reconstruction Results #10

Open
Fire-friend opened this issue Sep 14, 2024 · 1 comment
Open

Bad Reconstruction Results #10

Fire-friend opened this issue Sep 14, 2024 · 1 comment

Comments

@Fire-friend
Copy link

Thank you for your amazing work. I attempt to reconstruct the original image using the provided code and image, but the outcome is unsatisfactory. Can you offer any advice?

from src.eunms import Model_Type, Scheduler_Type
from src.utils.enums_utils import get_pipes
from src.config import RunConfig
from PIL import Image
from main import run as invert

model_type = Model_Type.SDXL_Turbo
scheduler_type = Scheduler_Type.DDIM
pipe_inversion, pipe_inference = get_pipes(model_type, scheduler_type, device='cuda')

input_image = Image.open("example_images/lion.jpeg").convert("RGB").resize((512, 512))
prompt = ""

config = RunConfig(model_type = model_type,
scheduler_type = scheduler_type)

edit_img, inv_latent, noise, all_latents = invert(input_image,
prompt,
config,
pipe_inversion=pipe_inversion,
pipe_inference=pipe_inference,
do_reconstruction=True,
# edit_prompt="a lion in the field"
)

edit_img.save("result.png")

image

@danielgaribi
Copy link
Collaborator

Do you use the same environment as mentioned in the requirements file?

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