Nodes/ComfyUI-AnimaForge-Windows/Anima Find Trained LoRA
ComfyUI Node

Anima Find Trained LoRA

Where did my trained LoRA go?

By AI-KSK·Created 3 months ago·Updated 3 months ago· 0
Anima Find Trained LoRA
    • lora_paths
    • lora_log
    output_dir/tmp/ComfyUI/models/loras/anima_lora
    name_filter

    After a batch run finishes, the outputs are scattered - one folder per trigger word under your LoRA directory, each with its .safetensors and a .train.log. AnimaFindTrainedLora is the tiny utility that answers "what did this run actually produce?" It scans your training output directory, finds every LoRA weight file, and hands you the paths, most recent first. It's not glamorous, but it's the node that turns a finished batch into a list you can actually act on.

    How it works

    The logic is a recursive walk of output_dir (find_trained_loras in train_runner.py). It collects any file ending in .safetensors, .pt, or .ckpt, optionally filtered by name_filter, and sorts the results by modification time descending - so the just-finished LoRA floats to the top. The paths come back as a newline-separated string. That's the whole mechanism: no state, no ComfyUI plumbing, just rglob and a sort. IS_CHANGED returns the current time so it rescans on every run, which means newly finished weights show up without a restart.

    If you ran the batch with the default layout, your LoRAs live at ComfyUI\models\loras\anima_lora\<trigger_word>\<trigger_word>.safetensors - the pack's output convention. This node is your way of confirming the trigger-word folder structure came out right before you go hunting in the file explorer.

    The inputs

    • output_dir - where to look. Defaults to ComfyUI\models\loras\anima_lora (auto-resolved to your actual ComfyUI directory, portable-prefix style). Point it elsewhere to scan a different root.
    • name_filter - a case-insensitive substring filter on the filename. Leave blank for everything; type rebecca to see only LoRAs with that in the name.

    Outputs: lora_paths (the newline-separated file list) and lora_log (a one-line summary like Found 3 trained LoRA file(s) under ...).

    Installing it

    It's in the AnimaForge Windows pack like the rest: ComfyUI Manager → "ComfyUI-AnimaForge-Windows", or

    cd C:\ComfyUI\custom_nodes
    git clone https://github.com/AI-KSK/ComfyUI-AnimaForge-Windows.git
    cd ComfyUI-AnimaForge-Windows
    powershell -ExecutionPolicy Bypass -File .\scripts\install_windows.ps1
    

    Nothing extra to download - it's pure filesystem logic, and output_dir is a string you type, not a model you load. Restart ComfyUI after installing.

    Common issues

    The predictable failure is ERROR: output_dir does not exist - if you typed the path rather than using the default, it's easy to miss a character. The other thing people trip on is expecting this node to be the last step in the training workflow itself; it's not wired that way in the shipped graphs (it's a utility, not a pipeline stage), so drop it in a scratch workflow whenever you want a listing. And a genuinely useful habit: since the sorted-by-mtime order surfaces the newest file first, this node doubles as a quick "did the last run actually overwrite my LoRA?" check - if the newest path isn't the one you expected, the run probably failed and left the old weights in place.

    CategoryAnima/Batch LoRA

    Inputs (2)

    NameTypeDefaultDescription
    output_dirSTRING/tmp/ComfyUI/models/loras/anima_lora
    name_filterSTRING

    Outputs (2)

    NameTypeDescription
    lora_pathsSTRING
    lora_logSTRING