balazik / ComfyUI-PuLID-Flux

PuLID-Flux ComfyUI implementation
Apache License 2.0
332 stars 21 forks source link

Models will apply pulid no matter it liked to pulid or not after first generation #41

Open sd2530615 opened 1 week ago

sd2530615 commented 1 week ago

i set 2 ksamplers with flux.dev.1.

one with pulid and one not ,and keeping seed/sampler/scheduler the same of course.

first generation it works well ,but bugs comes out with 2nd generation.

the ksampler with out pulid was "pollute" by pulid and applied pulid, thus all those 2 ksamplers outpu the same image.

it would fix even i remove all pulid things in workflow, only Restart the comfyui can fix it.

first image was the first generation with pulid, it goes normal and works well,

first

2nd image that node bugged that pulid will applied to all models even not linked with it 2nd

balazik commented 1 week ago

Hi, when you look in the readme in issues you will see:

When the ApplyPulidFlux node is disconnected after first run, the Flux model is still influenced by the node.

Yes, I know about the issue, it is caused by the way how is PuLID for Flux integrated into the model. I literally patch the loaded model, so even if you have a sampler without it will always apply the PuLID because the loaded Flux model is already patched in memory. I know this is wrong, but ComfyUI had no hooks that allowed me to override the original forward, so I made this hacky solution. I plan to release a new version, where I will try to use the intended model patcher to mitigate this but I don't know if it will work.

sd2530615 commented 1 week ago

i see, thanks for you answering me and great work on this node.