civitai / civitai_comfy_nodes

Comfy Nodes that make utilizing resources from Civitas easy as copying and pasting
88 stars 18 forks source link

[Feature Request] One Civit.ai Loader to rule them all #6

Open aegis72 opened 11 months ago

aegis72 commented 11 months ago

In addition to checkpoints and LORAs, it would be cool to be able to also load embeddings etc in the same way. The coding is beyond me, but the flow might not be. Ideally, you have one loader, and that loader has a drop down with the following options: image (Yellow X would be unsupported, the red-line ones might be mostly deprecated at this point, since there aren't any examples on Civit to load for either redline category).

You'd paste in the AIR as before.

Based on the drop-down selection, it would: 1) compare the "type" reported in the AIR and compare it to the drop down. If it doesn't match, you could throw an error (IE, "Selected Type and AIR type mismatch, please change dropdown to (AIR type) 2) Download the resource into the appropriate directory for that type of resource (perhaps for maximum sauciness, use an alternate config location file the user can override defaults with). 3) For Embeddings, I am not sure if output attachment-points can be dynamically changed. If not, just provide an output for each type...some will be unused and the user has to wire it up to the right output slot. If so, then the available output would change to match the selected type(CKPT, Lora, VAE, Embedding, etc). For instance, the embedding might output a text line of (embedding:embeddingname:X), where X is a weight that the user types into the node. This could then be fed into either a prompt box, similar to PowerPrompt, or concatenated into the prompt. 4) For VAEs, it would output similar to checkpoint and LORA, but on a VAE output. 5) Lycoris would follow similarly. Really, it's mostly the Embeddings that would need drastically different treatment, and if it is too much to make a loader for all in one, maybe one that does "models" and one that does embeddings?

Finally, it would have a dropdown for the already loaded models/embeddings/VAEs/whatever. You'd have a blank entry at the top, and then an enumerated list. If you select anything in that list other than the initial Null option, then the stuff in the AIR field would be ignored, using the local resource instead.

JustMaier commented 11 months ago

@WASasquatch would this be possible?

WASasquatch commented 11 months ago

This is certainly possible with extensive front-end modification.

My problem with this is ComfyUI isn't really yet handling extensions well. If someone installs CivitAI Nodes, and decides for example they don't want them, and disable/delete them to uninstall as suggested, the extensions would remain and ruin the ComfyUI install, creating more steps for the end user. I am also not the most familiar with the JavaScript side of ComfyUI. I do know a few users who are wizards in this area that perhaps may be interested in lending a hand.

We ideally need a way for modules to load scripts dynamically on server launch, and then clear out those "temp" scripts provided by custom nodes on launch if their parent doesn't exist or is not enabled.

it would be cool to be able to also load embeddings

To the effect of embeddings, I do have an idea for that, but I was trying to get some testing for it and clear it by @JustMaier before we push live.

aegis72 commented 11 months ago

I wish I could be more helpful beyond the "idea/pseudocode" level, but my job is drawing pretty pictures for a living, not so much the code side :). I'd be happy to do some mockup work though if that would be helpful.

BuildBackBuehler commented 9 months ago

I'd love if it were able to act as a browser of Civit entirely. Take care of the laborious task of navigating to the right folder (LoRA vs Embedding vs Ckpt, etc.).

I'll take a look @ the A1111 extension that does some of these things and see if I can parse the code for the bits and pieces that could perhaps be integrated into the wonderful node you have here WASasquatch =). I'll take a stab at it if I find the time.

WASasquatch commented 8 months ago

I wish we could drag pythongosssss into this project. He has a Lora info front end script and stuff that is based on CivitAI API. It could make this very "cool".

aegis72 commented 8 months ago

That would indeed be amazing. TBH, your and their nodes really helped make my workflow possible. Btw, do you guys know of nodes that

aegis72 commented 8 months ago

One other set of nice-to-haves, place the Lora/ckpt/embedding in a subfolder according to its version, ie “models/checkpoints/xl or 1.5. I organize my files that way. Alternatively, update the model loader dropdown with a filter switch for xl or 1.5

TomLucidor commented 8 months ago

Tuning ComfyUI into an art cache will be good, now imagine how this plays with Stability Matrix and their integration with Khoya and A1111.

BarrenWardo commented 6 months ago

I kind of agree with @BuildBackBuehler.

@WASasquatch, checkout this. If you can check this repo and try civitai in something like this will be really cool. https://github.com/talesofai/comfyui-browser

Just suggesting. Hope it helps!