Nodes/comfyui-lora-tag-hash-metadata/Civitai Resources To Hash Metadata
ComfyUI Node

Civitai Resources To Hash Metadata

Credit every model in your upload — not just the LoRAs

By PBandDev·Created 6 months ago·Updated 15 days ago· 2
Civitai Resources To Hash Metadata
    • additional_hashes
    • resolved
    • missing
    • resources_json
    civitai_resources
    loaded_loras

    CivitAI auto-links the resources on your upload purely by file hash, and that works fine for LoRAs - until you use a resource it can't detect from the prompt. Whole workflows, text encoders (type "Other"), a detailer LoRA applied selectively: none of those show up in <lora:...> tags, so none of them get credited. Civitai Resources To Hash Metadata is the v2 grown-up of the comfyui-lora-tag-hash-metadata pack, and it closes exactly that gap: paste the CivitAI link (or hash, or AIR URN) for any resource and it resolves it to the AutoV2 hash CivitAI matches on, so the creators get credited when you upload.

    How it works

    You drop one resource per line into a textbox. Each line is resolved through CivitAI's public API - no key needed - which is where it beats v1: URLs unpin to the model's latest version, pinned URLs and AIR URNs resolve to a specific version, and hashes can be looked up directly. For every entry it pulls the file's AutoV2 hash (the 10-char hex in CivitAI's file metadata) and emits Name:AUTOV2[:Weight] entries. It's an output node, so it executes standalone - you don't need a saver wired up just to check the status list it renders right inside the node.

    Resolution results are cached on disk under ComfyUI's user directory: version- and hash-pinned lookups live forever, unpinned model URLs refresh after 24 hours, and cached entries keep working offline. One line of defense worth knowing: a failed lookup never aborts the queue - bad lines land in missing and the status list and everything else keeps running.

    The inputs that matter

    • civitai_resources - the required multiline box, one resource per line. Anything on any civitai domain (.com/.red/.green), optionally pinned with ?modelVersionId=…; a 10-char AutoV2 hash or full 64-char SHA256; AIR URNs like urn:air:anima:lora:civitai:2767064@3114726; an optional trailing weight (<line> 0.8); # comments and blanks ignored. Bare numeric IDs are rejected as ambiguous.
    • loaded_loras - optional, handled exactly like v1: <lora:name:weight> tags get hashed from your local files.

    If hand-copying URLs sounds miserable, don't: the node's + Add Resource button opens a searchable picker with a live CivitAI search tab and, if you have LoRA Manager installed, a local tab that picks from everything it indexes and inserts the right link or hash for you. The status list updates live, per-row ✕ buttons clean up the textbox, and a ⟳ Refresh re-resolves without queueing a prompt.

    Outputs: additional_hashes (the string you wire into Image Saver Metadata), resolved / missing (quick display), and resources_json - structured JSON of every entry's status, type, version, hash and links for downstream tooling.

    Installing it

    Same pack as v1 - one install covers both. ComfyUI Manager → Install Custom Nodes → search LoRA Tag Hash Metadata → Install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PBandDev/comfyui-lora-tag-hash-metadata
    

    No model files, no pip deps, no API key. Two notes: the pack wants a recent ComfyUI (0.3+, new node API), and if you cloned from git you'll need pnpm install && pnpm build in the folder - dist/ isn't committed, and that's where the picker and status-list UI live.

    Where people get burned

    The same Image Saver footgun as v1: Name:HASH:Weight three-part entries are only parsed when Image Saver Metadata's download_civitai_data is True. Leave it False and weighted entries - including all v1 output - silently vanish. Keep it on.

    Two v2-specific traps. An unpinned URL resolves to the model's latest version, so your credit drifts if the creator ships an update - pin with ?modelVersionId= when that matters. And if you rely on the LoRA Manager tab for checkpoints, remember it hashes checkpoints lazily: an unmatched one shows a disabled "no hash" button until you hash or match it in LoRA Manager itself.

    It's the pick of the pack. If you post anything to CivitAI and you're only crediting your LoRAs while a text encoder and an entire workflow go uncredited, this is the node that fixes your resources panel.

    Categoryutils/metadata

    Inputs (2)

    NameTypeDefaultDescription
    civitai_resourcesSTRING
    loaded_lorasoptSTRING

    Outputs (4)

    NameTypeDescription
    additional_hashesSTRING
    resolvedSTRING
    missingSTRING
    resources_jsonSTRING