generative-models icon indicating copy to clipboard operation
generative-models copied to clipboard

Question: Inpainting model for SDXL

Open Markus-Pobitzer opened this issue 1 year ago • 21 comments

Dear Stability AI Team

Thanks for an other great release!

Do you plan on releasing an inpainting model for SDXL too?

Markus-Pobitzer avatar Jul 17 '23 10:07 Markus-Pobitzer

I will much appreciate any news about inpainting too!

aleksmirosh avatar Jul 17 '23 16:07 aleksmirosh

+1

mlconnor avatar Jul 20 '23 02:07 mlconnor

+1

jiqizaisikao avatar Jul 23 '23 02:07 jiqizaisikao

Waiting for the inpainting model for SDXL, too!

wangqyqq avatar Jul 24 '23 12:07 wangqyqq

it will be v-prediction and zero terminal SNR, most likely. i think that will come with 1.1.

bghira avatar Jul 26 '23 14:07 bghira

when to release the inpainting model? there will be much use of the inpainting model

yang-fei avatar Jul 27 '23 03:07 yang-fei

Thanks @bghira! Is there a timeline for this? Also, is the SDXL-base model v-prediction too or is that also in the 1.1 release?

jaidevshriram avatar Jul 27 '23 08:07 jaidevshriram

SDXL can already be used for inpainting, see: https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/stable_diffusion_xl#inpainting

To me it seems like they are using the base model for inpainting.

Will there be a fine tuned version like stable-diffusion-2-inpainting?

Markus-Pobitzer avatar Jul 27 '23 09:07 Markus-Pobitzer

Anyone notice inpainting with a mask alters the image the mask says it should not be altering? Is this expected?

landmann avatar Jul 27 '23 10:07 landmann

@landmann If you are referring to small changes, than it is most likely due to the encoding/decoding step of the pipeline. We bring the image in a latent space (containing less information than the original image) and after the inpainting we decode it back to an actual image but in this process we are losing some information (the encoder is lossy as mentioned by the authors). This is expected behavior.

Workaround can be found here: https://github.com/huggingface/diffusers/issues/3514#issuecomment-1565221994

Markus-Pobitzer avatar Jul 27 '23 11:07 Markus-Pobitzer

Haha good ol ctrl+c ctrl+v - love it.

landmann avatar Jul 27 '23 11:07 landmann

Is it possible to finetune SDXL 1.0 base model for inpainting?

I tried to do that but I get a error from UNET that it expects the input to have 4 channels but it got 9 channels (4 - input image, 4 - masked image, 1 - mask (B/W))

Am I doing anything wrong or should I wait for inpainting model release?

shreyassks avatar Aug 13 '23 09:08 shreyassks

if you're feeling adventurous you can modify the pix2pix finetuner from Diffusers project.

it already uses 8 channel input.

bghira avatar Aug 13 '23 14:08 bghira

+1

nasy avatar Aug 17 '23 10:08 nasy

+1 im waiting for inpainting model of SDXL

JohanHuynh0130 avatar Aug 30 '23 20:08 JohanHuynh0130

SDXL INPAINTING MODEL has been out!

JohanHuynh0130 avatar Sep 01 '23 18:09 JohanHuynh0130

Is there any in-paint configs for SDXL 1.0 (base)?

yjhong89 avatar Nov 06 '23 12:11 yjhong89

A yaml file for SDXL-inpainting is desperately needed.

gel-crabs avatar Dec 19 '23 17:12 gel-crabs

yes pls !

kalle07 avatar Dec 19 '23 21:12 kalle07

new inpaint model https://huggingface.co/wangqyqq/sd_xl_base_1.0_inpainting_0.1.safetensors/blob/main/sd_xl_base_1.0_inpainting_0.1.safetensors

its also HALF so 16GB RTX nvidia doesnt work !

kalle07 avatar Dec 21 '23 16:12 kalle07

as i mentioned in webui post, this sdxl-inpaint model can work in 16-bit float and you don't need to appy --no-half-vae or --no-half. you can download the model, merge the code in pull request https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14390 and try it!

wangqyqq avatar Dec 22 '23 02:12 wangqyqq