Extract and Save Lora ๐Ÿฒ

Ryuu_ExtractAndSaveLora

RyuuNoodles ๐Ÿฒ/Utilsexperimentaloutput node

Saves the model and text encoder diffs as LoRA weights in .safetensors format. How is this different from the built-in Extract and Save LoRA node? This one allows you choose not to save text encoder weights if any text encoder key difference is 0 or if the sepcific *.transformers.text_projection.weight key is 0. It also allows you to choose file suffix, and adds keywords to the filename like r40 to indicate rank size, _TE / _noTE to indicate if the text encoder diff was included, and _biasdiff to indicate that bias differences were included. Workflow can also be saved by embedding it into the LoRA's metadata. It's possible this node doesn't quite work for the TE saving and all that, I've had unexpectedly mixed result for the same extracts when there shouldn't have been any nuance.

Pack: ComfyUI-RyuuNoodles

custom_nodes.ComfyUI-RyuuNoodles

Inputs (10)

NameTypeRequired
filename_prefixSTRINGrequired
filename_suffixSTRINGrequired
rankINTrequired
lora_typeCOMBOrequired
bias_diffBOOLEANrequired
skip_on_any_diff_zeroBOOLEANrequired
skip_on_proj_diff_zeroBOOLEANrequired
embed_workflowBOOLEANrequired
model_diffMODELoptional
text_encoder_diffCLIPoptional

Outputs (0)

No outputs