Nodes/m10i/Load LoRA from File
ComfyUI Node

Load LoRA from File

The LoRA loader with a text box instead of a dropdown

By 0nyx-networks·Created 7 months ago·Updated 4 months ago· 0
Load LoRA from File
  • model
  • clip
  • model
  • clip
file_name
strength_model1.00
strength_clip1.00
raise_error_on_failurefalse

Core ComfyUI's LoraLoader is a dropdown: you pick from the files in your loras folder by hand. That's fine until the LoRA you want is decided at runtime - downloaded mid-workflow, named by another node, or picked from a list you're iterating. Load LoRA from File is the version that trades the dropdown for a plain text field, which means the filename can come from anywhere. That one change is the whole reason this node exists.

How it works

Under the hood it's the exact same machinery as the core loader: it resolves the file_name against your loras directory with folder_paths.get_full_path("loras", ...), loads the weights with comfy.utils.load_torch_file(..., safe_load=True), and applies them via comfy.sd.load_lora_for_models(model, clip, lora, strength_model, strength_clip). Output model and clip are the patched versions, ready for the sampler. Same backend, same result - the only difference is how the filename gets in.

That's the thing to grasp: file_name is a forced string input. No dropdown, no autocomplete - you either type the exact filename (including extension, like my_style_v2.safetensors) or you wire it from another node. Wire it from the pack's LoadSafetensorsFromUrl and you've built "download this LoRA from a URL, then apply it" in one run. Pull it out of a JSON or CSV pipeline and you've got dynamic LoRA selection.

Inputs and outputs

  • model, clip - the incoming model and CLIP.
  • file_name - the LoRA filename, as a string. This is the one that matters.
  • strength_model, strength_clip - both default 1.0, range −100 to 100. 1.0 is full strength; typical working range is 0.5–1.2 for style, and you'll see people run some LoRAs as low as 0.2.
  • raise_error_on_failure (optional) - default false.

Outputs: model, clip.

The trap to know about

With raise_error_on_failure off (the default), a missing file or a bad LoRA silently returns the model and clip unchanged and just prints an error to the console. Your workflow runs fine and produces an image with no LoRA applied at all - which is very easy to miss if you're not staring at the terminal. If your LoRA "isn't working," flip raise_error_on_failure to on, or double-check the filename matches exactly. This is the node's one real footgun, and it's worth knowing before it costs you a batch.

Install

ComfyUI Manager → search "comfy-nekonote-extensions", or:

cd ComfyUI/custom_nodes
git clone https://github.com/0nyx-networks/comfy-nekonote-extensions

Restart ComfyUI; it's under NEKONOTE → Load. The pack (MINETA "m10i" Hiroki, MIT, v0.4.7) has no model files to download - the LoRAs it loads are your own. Built on the newer comfy_api.latest backend API, so keep ComfyUI current.

CategoryNEKONOTE/Load

Inputs (6)

NameTypeDefaultDescription
modelMODEL
clipCLIP
file_nameSTRING
strength_modelFLOAT1.00-100–100
strength_clipFLOAT1.00-100–100
raise_error_on_failureoptBOOLEANfalse

Outputs (2)

NameTypeDescription
modelMODEL
clipCLIP