ComfyUI Node

Metadata Test Sampler

Test your metadata pipeline without loading a single model

By xxmjskxx·Created about a year ago·Updated about a month ago· 25
Metadata Test Sampler
    • images
    positive_promptSynthetic prompt for metadata validation
    negative_prompt
    model_nametest_models/fake-model.safetensors
    model_hashFAKEHASH001
    vae_nametest_vaes/fake-vae.safetensors
    vae_hashFAKEVAE001
    clip_name1test_clip/fake-clip-1.safetensors
    seed123456
    steps6
    cfg3.0
    sampler_nameeuler
    schedulernormal
    guidance1.0
    width512
    height512
    batch_size1
    colour_r0.00
    colour_g0.00
    colour_b0.00
    generator_versionmetadata-stub-1.0
    clip_name2
    clip_name3
    clip_name4

    Model loading is slow. Checkpoint, CLIP, VAE - every full run spends its first minutes just pulling weights off disk. When all you want to do is verify that your metadata capture works - that the save node records the right sampler, the right LoRA names, the right hashes - that wait is pure waste. Metadata Test Sampler exists to make that test take two seconds: it fakes being a sampler and emits a solid-color image, but every one of its inputs is real metadata that the save node captures exactly as if you'd run a full pipeline.

    It's a testing stub, and it's honest about it. No models load, no GPU sampling happens; you get a batch of flat-colored rectangles with a full metadata payload attached. Wire it into Save Image w/ Metadata Universal, save, and inspect the PNG's metadata. If the parameters are right, your rule config is right - without touching your real models.

    The inputs

    Everything here is a metadata record disguised as a generation parameter:

    • positive_prompt / negative_prompt - recorded verbatim (defaults to a "Synthetic prompt for metadata validation").
    • model_name / model_hash, vae_name / vae_hash - fake names and hash stubs (defaults like test_models/fake-model.safetensors, FAKEHASH001). The tooltip is explicit: no file access happens, these are just reported.
    • clip_name1 (plus optional clip_name2/3/4) - encoder names recorded in metadata; leave the extras blank to skip.
    • seed, steps, cfg, guidance, sampler_name, scheduler - the generation settings the save node normally pulls off a real KSampler. sampler_name defaults to euler, scheduler to normal.
    • width / height / batch_size - the size of the synthetic output. Bump batch_size and the saved metadata records batch index/size, which is handy for testing batch handling.
    • colour_r / colour_g / colour_b - the RGB of the flat image (each 0–1). Change these if you want distinguishable outputs per run.
    • generator_version - an optional version string recorded as "Metadata generator version".

    The single images output is a solid-color IMAGE batch. Since batch_size is capped at 8 and dimensions at 4096, it's cheap enough to run dozens of times while iterating on rules.

    Actually getting it

    The node shows up under SaveImageWithMetaDataUniversal/Test after you install the pack - the |unimeta variant is registered by default. (There's also a plain MetadataTestSampler class, but that one only loads when you set the METADATA_ENABLE_TEST_NODES=1 environment flag before launching ComfyUI - you don't need it, since the |unimeta version is the always-on one.)

    The loop it enables

    The README's testing advice basically assumes this node exists:

    1. Build: Metadata Test SamplerSave Image w/ Metadata Universal.
    2. Save, then drag the PNG back into ComfyUI or open it in a metadata viewer.
    3. Missing a field? Re-run the scanner, tweak rules, re-save rules, test again.

    Pair it with the METADATA_TEST_MODE=1 env flag (multiline, deterministic parameter output) and you get diffable snapshot output - ideal for confirming that "field X now shows up" without squinting at one giant line. For testing whether your save node is doing its job, nothing beats a node that costs nothing to run.

    CategorySaveImageWithMetaDataUniversal/Test

    Inputs (23)

    NameTypeDefaultDescription
    positive_promptSTRINGSynthetic prompt for metadata validationPositive prompt recorded in metadata.
    negative_promptSTRINGNegative prompt recorded in metadata.
    model_nameSTRINGtest_models/fake-model.safetensorsModel name reported in metadata (no file access).
    model_hashSTRINGFAKEHASH001Precomputed hash string (optional metadata stub).
    vae_nameSTRINGtest_vaes/fake-vae.safetensorsVAE name reported in metadata (no file access).
    vae_hashSTRINGFAKEVAE001Precomputed VAE hash string.
    clip_name1STRINGtest_clip/fake-clip-1.safetensorsPrimary CLIP/encoder name recorded in metadata.
    seedINT1234560–2147483647Seed value recorded in metadata.
    stepsINT61–150Step count recorded in metadata.
    cfgFLOAT3.00–30CFG scale recorded in metadata.
    sampler_nameSTRINGeulerSampler name recorded in metadata.
    schedulerSTRINGnormalScheduler recorded in metadata.
    guidanceFLOAT1.00–30Guidance value; optionally mapped to CFG by the saver.
    widthINT51216–4096Output width for synthetic image.
    heightINT51216–4096Output height for synthetic image.
    batch_sizeINT11–8Number of images to generate (metadata records batch info).
    colour_rFLOAT0.000–1Red channel (0-1) for synthetic output.
    colour_gFLOAT0.000–1Green channel (0-1) for synthetic output.
    colour_bFLOAT0.000–1Blue channel (0-1) for synthetic output.
    generator_versionSTRINGmetadata-stub-1.0Optional version string recorded under Metadata generator version.
    clip_name2optSTRINGSecondary CLIP entry (leave blank to skip).
    clip_name3optSTRINGTertiary CLIP entry (leave blank to skip).
    clip_name4optSTRINGAdditional CLIP entry (leave blank to skip).

    Outputs (1)

    NameTypeDescription
    imagesIMAGE