Nodes/ComfyUI-Lora-Manager/Metadata Overwrite (LoraManager)
ComfyUI Node

Metadata Overwrite (LoraManager)

When ComfyUI gets your image metadata wrong, fix it by hand

By willmiao·Created 2 years ago·Updated about 8 hours ago· 1,373
Metadata Overwrite (LoraManager)
  • sampler
  • model
  • metadata
prompt
negative_prompt
seed0
steps0
cfg_scale0.00
scheduler
loras
size
clip_skip-25
additional_data

Every image you save in ComfyUI is a recipe if the metadata is right - prompt, sampler, seed, LoRAs, all of it embedded in the file. That's how people reproduce each other's work. The LoraManager pack's Save Image node tries to collect all of that automatically, but "tries" is doing a lot of work there. When it guesses wrong - the seed came from a reroute, the sampler got renamed internally, you generated in a half-turbo way the collector can't see - Metadata Overwrite (LoraManager) is the correction tool.

The node's own description says it best: it "manually specifies generation parameters to override automatically collected metadata." It's an output node that emits a METADATA object, which you wire into the pack's Save Image node. The elegant bit is the convention on every input: empty or zero means "leave it alone." Only fields you actually fill or connect take effect. So you can fix just the seed and let everything else ride, or supply every field when you want a fully deterministic record.

The inputs that matter

  • sampler - type in a name or connect a SAMPLER output (say, from KSamplerSelect) and it extracts the name automatically. Heads-up from the author's tooltip: ddim gets recorded as euler, because that's ComfyUI's internal representation.
  • model - type a name or connect a MODEL output; the model name is pulled from the patcher. If you connect a MODEL that has no cached_patcher_init, it logs a warning and skips rather than guessing.
  • loras - standard syntax: <lora:name:strength> or <lora:name:model_strength:clip_strength>, space-separated.
  • clip_skip - the one input with a sentinel default of -25, which means "not set." Anything else overwrites. The conventions differ between UIs: ComfyUI uses -24..-1, A1111 uses 1+, so -25 was chosen because neither convention has a meaningful 0. That's also why a wired value of 0 survives - 0 is a legitimate "no clip skip" in this system.
  • size - WIDTHxHEIGHT, like 512x768.
  • additional_data - free text slipped into the A1111-compatible parameters string between Clip skip and Model hash, so you can embed things like "Copyright": "Some license info".

The rest are exactly what they sound like: prompt, negative_prompt, seed, steps, cfg_scale, scheduler.

When you'd actually use it

Three situations keep bringing me back. Batch jobs where you want the same author credit or copyright on every file. Workflows where the auto-collector can't see a parameter (it's computed mid-graph, or it came from a node the collector doesn't track). And re-embedding metadata into images you're about to share, so the CivitAI-style detail page reproduces the settings. It's also genuinely handy for documenting a recipe: set the fields once, and the saved PNG carries the full params string even if the workflow later gets edited into a pretzel.

Install

It ships in willmiao/ComfyUI-Lora-Manager, so install the pack first. ComfyUI Manager is the easy path: Manager → Custom Node Manager → search lora-manager → Install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/willmiao/ComfyUI-Lora-Manager
cd ComfyUI-Lora-Manager
pip install -r requirements.txt
# restart ComfyUI

The dependencies are modest web/serialization libs - no heavy model files. This node, though, is worthless on its own: it only makes sense paired with the pack's Save Image node, which is where the METADATA input gets consumed and written into the file.

Common issues

The trap is expecting it to overwrite when you didn't actually fill the field. A leftover default of 0 for steps or an empty sampler string is silently ignored - that's the design, and it's why you should clear (not zero) a field you no longer want to force. And if you connect a MODEL and the metadata still shows the old name, check the console: the "no cached_patcher_init" warning means it declined to guess rather than write garbage.

CategoryLora Manager/utils

Inputs (12)

NameTypeDefaultDescription
promptoptSTRINGPositive prompt. Only overwrites when non-empty.
negative_promptoptSTRINGNegative prompt. Only overwrites when non-empty.
seedoptINT00–18446744073709550000Seed value. Only overwrites when > 0.
stepsoptINT00–10000Number of steps. Only overwrites when > 0.
cfg_scaleoptFLOAT0.000–100CFG scale. Only overwrites when > 0.
sampleroptSTRING,SAMPLERSampler name. Fill in the name manually or connect a SAMPLER output (e.g. KSamplerSelect) — the sampler name is then extracted automatically. Note: ddim is recorded as euler (ComfyUI internal representation). Only overwrites when non-empty.
scheduleroptSTRINGScheduler name. Only overwrites when non-empty.
modeloptSTRING,MODELThe checkpoint or diffusion model (UNet) used for generation. Fill in the name manually or connect a MODEL output — the model name is then extracted automatically. Only overwrites when non-empty.
lorasoptSTRINGLoRA syntax, e.g. <lora:name:strength> or <lora:name:model_strength:clip_strength>, separated by spaces. Only overwrites when non-empty.
sizeoptSTRINGImage size in WIDTHxHEIGHT format (e.g. 512x768). Only overwrites when non-empty.
clip_skipoptINT-25-25–24Clip skip (ComfyUI: -24..-1, A1111: 1+). Default -25 means not set — any other value overwrites.
additional_dataoptSTRINGAdditional data to embed in the image metadata. Inserted between Clip skip and Model hash in the A1111-compatible parameters string. Example: "Copyright": "Some license info"

Outputs (1)

NameTypeDescription
metadataMETADATA