nosiu / InstantID-faceswap

InstantID : Zero-shot Identity-Preserving Generation in Seconds 🔥
https://instantid.github.io/
Apache License 2.0
27 stars 4 forks source link

bad results #1

Open loboere opened 8 months ago

loboere commented 8 months ago

are you sure this works? I tried a black and white mask but the generated image is glitchy Can you upload an example of how to use this?

nosiu commented 8 months ago

faceswap.py file is an example. Running it should give you similar results to Example 2 from https://github.com/InstantID/InstantID/pull/89

If there is one tip I can give is to keep the resize option True it slows the process, but instantID doesn't work well (from my experience) with 'small' faces. If you are aiming for something more 'photorealistic' then you probably should download different SDXL checkpoint

Edit: I have almost ready a custom node for ComfyUI which does exactly that (swap faces) and allows you to inpaint the image on the fly. I will post the link here when I'm done with it.

triplecookedchips commented 8 months ago

Hey @nosiu - this looks great, any plans to add to replicate or huggingface in the near future?

nosiu commented 8 months ago

@triplecookedchips Link to custom node https://github.com/nosiu/comfyui-instantId-faceswap

I'm first time hearing about replicate and my relation with huggingface is very simple I treat it like a model repository (ez download nothing more). So who knows

johndpope commented 8 months ago

there's a lora on civitai I can't get to work with this - https://gist.github.com/johndpope/4c4ff9777a867fc4793f2278dba38e9f

size mismatch for text_model.encoder.layers.11.self_attn.q_proj.lora_A.orgasmface.weight: copying a param with shape torch.Size([1, 768]) from checkpoint, the shape in current model is torch.Size([2, 768]). - does the lora need to be retained to work? 

https://civitai.com/models/152791/orgasm-face-sdxl it works out of the box with this papercut sdxl model - only difference seems to be https://civitai.com/models/122567/papercut-sdxl

Trained using https://github.com/TheLastBen/fast-stable-diffusion SDXL trainer.

youjieWang commented 3 months ago

@nosiu I use same code and same example, but I can't get the same result for your example. And there is an issue for your code image

youjieWang commented 3 months ago

@nosiu I use same code and same example, but I can't get the same result for your example. And there is an issue for your code image

the result show behind image

nosiu commented 3 months ago

@youjieWang Yes, it's hard to get the right parameters without any visual aids. For that very reason, I made a plugin for Comfy, you can draw a mask and change parameters on the fly.

https://github.com/nosiu/comfyui-instantId-faceswap