yolain / ComfyUI-Easy-Use

In order to make it easier to use the ComfyUI, I have made some optimizations and integrations to some commonly used nodes.
GNU General Public License v3.0
1.11k stars 78 forks source link

support partial override for EasyLoader #344

Closed Lenqth closed 3 months ago

Lenqth commented 3 months ago

Currently, when inputting override in EasyLoader (Flux), you must input all three of model, vae, and clip at the same time or an error will occur.

However, there seems to be a FLUX.1 model that does not include CLIP (e.g. https://civitai.com/models/656083), and I got an error when I load it.

Therefore, I made it possible to override only a part of it, and to not read the overridden VAE and/or CLIP from the checkpoint.

yolain commented 3 months ago

Thanks for you commit, but this is not good practice. You should load the clip model separately, not load the model from checkpoint to get the clip model, because it will load the unet again.

yolain commented 3 months ago

Look like this example: image

Lenqth commented 3 months ago

Thank you, It works. but I have a problem. The model has VAE and Model. I want to use Baked VAE.

I built the workflow below in modified version in this PR. I think this workflow not load the unet twice. image

If you want to keep behavior of overrides, I planned to do "Add Parameter for Dual CLIP loader to EasyLoader(Flux)" (Like vae_name) in another PR.

yolain commented 3 months ago

I think it might be better to write a separate flux ckpt loader has unet and vae output. Because the original loader is already set, and going to modify the widgets would affect everyone's old workflow.

Lenqth commented 3 months ago

I think it might be better to write a separate flux ckpt loader has unet and vae output. Because the original loader is already set, and going to modify the widgets would affect everyone's old workflow.

I will try to write my own custom node to extract unet and vae from ckpt. Thank you for the advice.