shiimizu / ComfyUI-PhotoMaker-Plus

PhotoMaker for ComfyUI
GNU General Public License v3.0
221 stars 22 forks source link

REQUEST: please share the wf! #3

Closed agawrylak closed 1 month ago

agawrylak commented 8 months ago

I've had okay results with conditioning concat, combine does nothing, average is bad.

agawrylak commented 8 months ago

image wf should be encoded

klinter007 commented 8 months ago

i didnt see a workflow in your image, but i share the same feeling. i tried doing the same as the suggested workflow on the git, but feels like there's something missing.

shiimizu commented 8 months ago

I updated the Readme with a proper workflow. You may try using that as a base.

klinter007 commented 8 months ago

Mizu thank you for putting the time for it. I'm sorry but this is very unclear on how to use it - i actually did not get anything even similar to my images.

image

also, this version of the git says nothing about the lora, yet you load it in the new workflow you share.

please accept this as constructive criticism - I appreciate you putting the time and effort in building something and releasing to the community, but we need some more communication. thanks.

agawrylak commented 8 months ago

lora is the model, download it from huggingface

also for me your wf does not work at all

klinter007 commented 8 months ago

workflow (9).json

agawrylak commented 8 months ago

@klinter007 this one works for you? where did you get lora in safetensors?

shiimizu commented 8 months ago

also, this version of the git says nothing about the lora, yet you load it in the new workflow you share.

please accept this as constructive criticism - I appreciate you putting the time and effort in building something and releasing to the community, but we need some more communication. thanks.

photomaker-v1.bin contains a CLIP Vision model and a LoRa. It should show up in the Lora Loader node and load the correct weights automatically. I had to change it like this because users didn't want to manually extract the LoRa inside. So you only need to download one file: photomaker-v1.bin and place it in a photomaker directory in the models directory. You can delete the previous lora file that you made.

Ideally, the trigger_word should be placed right after the subject, in this case man or woman, because it will repeat those tokens by the number of images supplied. In your case now: handsome man img wearing glasses,. Before, it was repeating the comma , token.

agawrylak commented 8 months ago

unfortunately does not seem to work for me at all with the wf provided in description

jesenzhang commented 8 months ago

Don't work! image

LubuLubu2 commented 8 months ago

Yeah mine doesn't work either, it generates whatever in the prompt and ignores the image i gave it, both with JugXL and Realvision xl with .7 or 1 lora wight.

shiimizu commented 8 months ago

Please try with and without the trigger_word. If the final image changes, then that means it's working. If you're generating a man with a woman's profile picture, you will get what she would look like if she were a man.

LubuLubu2 commented 8 months ago

Untitled

Please try with and without the trigger_word. If the final image changes, then that means it's working. If you're generating a man with a woman's profile picture, you will get what she would look like if she were a man.

Sadly doesn't matter in my case, don't know what i do wrong, but with trigger word or without it or trigger word alone or trigger word at the start of the prompt or at the end of it, with or without "," the result is the same, it create a generic man.

bmaltais commented 8 months ago

I noticed that the non Diffuser implementation is not as "strong" as the original PhotoMaker code. It tend to fade away on longer prompt... I will try the latest version with the new prompt code... maybe it fix the issue I noticed yesterday.

BUt for sure, make sure you put the token img AFTER the class for the subject... So if your subject is a man... your prompt should look like: portrait of a man img wearing a suit

shiimizu commented 8 months ago

The diffusers implementation only accepts 77 tokens and truncates anything longer than that. ComfyUI and SD-WebUI can exceed that limit. I’ve added support for stating the trigger_word multiple times, so maybe you can try that if your prompt gets long.

bmaltais commented 8 months ago

Here is a side by side comp:

workflow

As you can see, somehow, the non diffuser likeness is very low... I am using the same CKPT as the diffuser version in this example...

bmaltais commented 8 months ago

I tried using the exact model from the same huggingface account and it is even worst...

workflow (1)

bmaltais commented 8 months ago

OK... I think I found the issue... Here is the results if I use a file path to images of her instead of passing an image as input:

workflow (2)

Likeness via your ComfyUI node is on par... so I suspect an issue with how the node is processing direct input images...

shiimizu commented 8 months ago

That's the Style strength ratio feature which is basically using the original conditioning (without PhotoMaker) for the first n steps, and then switching to the PhotoMaker conditioning for the rest of the steps. You can replicate this behaviour in ComfyUI using 2 Advanced KSamplers.

workflow (4)

bmaltais commented 8 months ago

This is awesome... so there is a bit more from a workflow to get similar results to the diffuser version...

workflow (3)

drphero commented 8 months ago

So this doesn't work with the regular loadimage node? But the README workflow shows that should work.

agawrylak commented 8 months ago

for me it also only works when giving dir, so we must be doing something wrong

bmaltais commented 8 months ago

for me it also only works when giving dir, so we must be doing something wrong

Indeed… not sure why… maybe the node expect the image to be in a specific resolution, format and since we are no passing that is silently fail?

LubuLubu2 commented 8 months ago

Yep, i used image path and it worked. quality is not on pair with IPAdapter tho, the image it creates is not as accurate to the images i feed it.

hben35096 commented 8 months ago

Same problem, only works after filling in the image path, and it doesn't work as well as IPAdapter. Compared to the official version, this plugin has too few options.

bmaltais commented 8 months ago

Same problem, only works after filling in the image path, and it doesn't work as well as IPAdapter. Compared to the official version, this plugin has too few options.

Compared to the diffuser version it can produce the exact same result but with a much more complex workflow, but it can be done. I also have issues with the direct image not working. Hopefully this can be addressed… or I might just dive in the node code and fix it myself… and create a PR to merge it to main.

hben35096 commented 8 months ago

image

This is the effect of FaceID

LubuLubu2 commented 8 months ago

Thank you. New update and workflow works even with load image. I don't know what style strength ratio is but both produce the same image and both of them are less accurate than what the first sampler generates.

hben35096 commented 8 months ago

image

Thanks, it worked~

danzakuo commented 8 months ago

workflow_photomaker(shiimizu) Thanks @bmaltais & @hben35096. Finally, the face looks the same as in the photomaker demo.

jesenzhang commented 8 months ago

@shiimizu Would you make a ComfyUI reference implementation for InstanceID?

shiimizu commented 8 months ago

@jesenzhang https://github.com/shiimizu/ComfyUI-PhotoMaker-Plus/issues/15#issuecomment-1906861379

jesenzhang commented 8 months ago

@jesenzhang #15 (comment)

Got it,thx.

Times125 commented 7 months ago

您好,我已经收到您的来信,会尽快处理。

shiimizu commented 1 month ago

Workflows are available at https://github.com/shiimizu/ComfyUI-PhotoMaker-Plus/tree/main/examples

Times125 commented 1 month ago

您好,我已经收到您的来信,会尽快处理。

ccloverx commented 1 month ago

谢谢,你的邮件我已经收到,我会尽快阅读并给与回复