ToTheBeginning / PuLID

[NeurIPS 2024] Official code for PuLID: Pure and Lightning ID Customization via Contrastive Alignment
Apache License 2.0
2.58k stars 179 forks source link

How to run img2img #80

Closed mamicro-li closed 1 month ago

Roweguy commented 1 month ago
mamicro-li commented 1 month ago

Is there any other repo that has implemented FLUX img2img so I can refer to.

Roweguy commented 1 month ago

Good

ToTheBeginning commented 1 month ago

Is there any other repo that has implemented FLUX img2img so I can refer to.

@mamicro-li You can refer to https://github.com/black-forest-labs/flux/blob/main/demo_gr.py#L71

mamicro-li commented 1 month ago

Is there any other repo that has implemented FLUX img2img so I can refer to.

@mamicro-li You can refer to https://github.com/black-forest-labs/flux/blob/main/demo_gr.py#L71

Thanks for your sharing! I have tried that code but it keeps generating foggy and blurry image which looks like a white filter is added on the original image. I run the vanilla img2img demo w/o pulid as well. It has the same problem. Is it normal or is there any problem with my setting?

ToTheBeginning commented 1 month ago

Is there any other repo that has implemented FLUX img2img so I can refer to.

@mamicro-li You can refer to https://github.com/black-forest-labs/flux/blob/main/demo_gr.py#L71

Thanks for your sharing! I have tried that code but it keeps generating foggy and blurry image which looks like a white filter is added on the original image. I run the vanilla img2img demo w/o pulid as well. It has the same problem. Is it normal or is there any problem with my setting?

Seems like the gradio demo from BFL has a BUG about vae range, it should be [-1, 1], but they are using [0, 1]

mamicro-li commented 1 month ago

Is there any other repo that has implemented FLUX img2img so I can refer to.

@mamicro-li You can refer to https://github.com/black-forest-labs/flux/blob/main/demo_gr.py#L71

Thanks for your sharing! I have tried that code but it keeps generating foggy and blurry image which looks like a white filter is added on the original image. I run the vanilla img2img demo w/o pulid as well. It has the same problem. Is it normal or is there any problem with my setting?

Seems like the gradio demo from BFL has a BUG about vae range, it should be [-1, 1], but they are using [0, 1]

In ComfyUI's flux pipeline, the pixel range is normalized to [0, 1] before VAE as well. Not sure if it is the key error. BTW, diffusers now has a good support on FLUX. Are you planning to reorg the code based on diffusers?

smthemex commented 1 month ago

The latest version of diffuser already supports Flux img2img's pipe process

mamicro-li commented 1 month ago

Diffusers works fine with Flux-PuLID without any bug.