ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

feat: LoRA as prompt

Open jjangga0214 opened this issue 2 years ago • 3 comments

Hi!

As we know, in A1111 webui, LoRA(and LyCORIS) is used as prompt. IMHO, LoRA as a prompt (as well as node) can be convenient.

Simplicity

When using many LoRAs(e.g. for character, fashion, background, etc), it becomes easily bloated.

스크린샷 2023-06-25 오후 11 23 29

Text prompts can reduce this.

Sharability

People tend to share EXIF in A1111 format. Text prompt is good for copy-and-paste. Sometimes what users want is getting started as rapid as possible. That's because they are so excited by new ideas that just checking out the result ASAP has higher priority.

Experiment

Users of ComfyUI are more hard-core than those of A1111. They experiment a lot. In many cases, text is faster to edit (with autocompletion or text editors). For example, on A1111 webui, I use find-and-replace feature in VSCode for automatically replacing multiple LoRA weights at once. What's more, I "generate" a text of list of LoRA with specific weights and additional args from a simple script(like .js, .py, or .sh) for experiments. This practice saves time a lot and thus essential in my workflow.

Conclusion

I like node-based workflow. But things especially like LoRA can benefit us by being prompt. Prompt grammar is DSL, and well-defined DSL becomes really productive.

How do you think?

Thank you :)

jjangga0214 avatar Jun 25 '23 14:06 jjangga0214

The Efficiency Nodes extension (https://github.com/LucianoCirino/efficiency-nodes-comfyui) has a three Lora stacker node, as well as a checkpoint loader with one optional Lora.

david9039 avatar Aug 06 '23 02:08 david9039

I think the ask here is something like allowing <lora:foo.safetensors:1.4> syntax, or something similar to how embeddings are done.

tildebyte avatar Aug 12 '23 21:08 tildebyte

fyi, ImpactWildcardEncode node does this among other things

knoopx avatar Sep 27 '23 08:09 knoopx