ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

how can i use fooocus_inpaint model in my inpaint workflow

Open oceanusXXD opened this issue 6 months ago • 2 comments

image

The inpainting functionality of fooocus seems better than comfyui's inpainting, both in using VAE encoding for inpainting and in setting latent noise masks

oceanusXXD avatar Dec 26 '23 12:12 oceanusXXD

我也需要呢

starinskycc avatar Dec 29 '23 03:12 starinskycc

https://github.com/comfyanonymous/ComfyUI/issues/2374

starinskycc avatar Dec 29 '23 03:12 starinskycc

inpaint foocus patch is just a lora, Modify the correct lora loading method, just copy the way fooocus loaded. for inpainting head im not sure.

Laidawang avatar Jan 08 '24 06:01 Laidawang

inpaint foocus patch is just a lora, Modify the correct lora loading method, just copy the way fooocus loaded. for inpainting head im not sure.

Have you tested it yet? Can it be used?

starinskycc avatar Jan 09 '24 00:01 starinskycc

not yet,I read the codes of both and they are basically the same, but I don't have a good way to modify the code. Fooocus redefines a lot of the underlying code.

Laidawang avatar Jan 09 '24 05:01 Laidawang

It's a somewhat custom Lora format, so the loader is modified, but also ComfyUI's ModelPatcher needs to apply the weights differently than other Lora. Makes it a bit ugly to implement, but here is a first version: https://github.com/Acly/comfyui-inpaint-nodes

Works well so far, but still experimenting.

Acly avatar Jan 24 '24 19:01 Acly

nice

starinskycc avatar Jan 25 '24 01:01 starinskycc