model change hole image tint color.

#4
by MarkMobini - opened

Hi ,
Thanks for the grate model.
I am using following pipline :

vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16).to("cuda")
pipeline = StableDiffusionXLInpaintPipeline.from_pretrained(
"OzzyGT/RealVisXL_V4.0_inpainting",
torch_dtype=torch.float16,
cache_dir=CACHE_PATH,
variant="fp16",
vae=vae,
).to("cuda")

generator = torch.Generator(device="cuda").manual_seed(seed)

image = pipeline(
    "",
    # width=mask.size()[2],
    # height=mask.size()[1],
    negative_prompt="",
    image=image,
    mask_image=mask,
    guidance_scale=4.0,
    strength=0.99,
    num_inference_steps=20,
    generator=generator,
).images[0]

The image inpainted correctly, but it changes the overall color of the image.

Screenshot 2024-09-25 at 11.33.28.png

In these parts, the mask was 0 but the color is changed.

Any help is appreciated.

Thanks

So when I do inpaint and replace the original image this happen :
Screenshot 2024-09-25 at 12.34.34.png

Yeah the inpainting SDXL models have that issue, it's known from the start so it's not a good solution.

You can read it on the only inpainting model that was trained for SDXL:

the quality of the image is degraded. The model retains the non-masked contents of the image, but images look less sharp. We're investing this and working on the next version.

Also you can read an issue we had about it too where I propose some solutions. You can get better results if you use the differential diffusion pipeline with a normal SDXL model or with the controlnet union promax for inpainting.

I don't use inpainting models anymore but I kept this model for the people that use it in their apps.

Thanks for the update.

MarkMobini changed discussion status to closed

Sign up or log in to comment