Nodes/ComfyUI-Zero2JSON/🎯 Z2J Subject Description
ComfyUI Node

🎯 Z2J Subject Description

31 million subject descriptions from two integers β€” the flagship of ComfyUI-Zero2JSON

By MushroomFleetΒ·Created 7 months agoΒ·Updated 5 months agoΒ· 1
🎯 Z2J Subject Description
    • text
    β—„seed0β–Ί
    β—„prompt_index0β–Ί
    β—„profilesubject_description_default.jsonβ–Ί
    β—„prefixβ–Ί
    β—„suffixβ–Ί
    β—„subject_typeanyβ–Ί

    The headline claim is almost rude in its simplicity: a fixed pair of numbers always gives you the same sentence, on any machine, forever. That's the entire trick this pack is built on, and Z2J Subject Description is where it pays off biggest. The shipped profile combines a subject type, adjectives, two detail slots, texture and quality into roughly 31 million unique descriptions - no LLM, no API, no model download, nothing to rent.

    This is the node to reach for when you want a structured subject description that fits the FLUX2-JSON way of prompting. FLUX2 models read prompts with an LLM text encoder, and the community has found structured, blocky prompts genuinely help ("structured json prompting works very well with Flux2 models… reduces ambiguity and concept bleed"). Zero2JSON is the "generate the field content for you" layer on top of that: you wire this node's text output into the description input of a FLUX2_SubjectCreator, and it fills in a physical, material, textured description instead of making you hand-write one.

    How it works

    No randomness anywhere. The node hashes (seed, prompt_index, slot) with xxhash32 and uses the hash to pick a template and one word from each pool:

    • one of 5 sentence templates with placeholders like {subject_type}, {adjective}, {detail_1}, {texture}, {quality}
    • a word from each pool (27 subject types, 15 adjectives, 12 details Γ—2, 12 textures, 9 qualities)

    5 Γ— 27 Γ— 15 Γ— 12 Γ— 12 Γ— 12 Γ— 9 is how you get ~31M combinations. Change the prompt_index and you slide to the "next" description in prompt space; keep it fixed and the seed changes it. It's exactly the position-as-seed methodology the pack's README sells.

    The inputs that matter

    • seed - the world seed; keep it linked to your sampler seed if you want a change of prompt to change the image in a related way.
    • prompt_index - the position coordinate. This is the one you'll actually farm: bump it to walk through descriptions without touching the seed.
    • profile - dropdown of subject_description_*.json files. Drop your own JSON into the profiles/ folder, restart, and it shows up.
    • prefix / suffix - text glued on front and back, useful for locking a name or a style anchor.
    • subject_type - a filter dropdown (any / person / character / object…). Fair warning: in the shipped v1.0.0 code this is accepted but not actually applied - generation ignores it. Plan around it and check for updates.

    Output is a single text string. Wire it into the FLUX2-JSON subject field, or into any Show Text node if you just want to read it.

    Install

    ComfyUI Manager: search "ComfyUI-Zero2JSON" and install. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MushroomFleet/ComfyUI-Zero2JSON
    cd ComfyUI-Zero2JSON
    pip install -r requirements.txt
    

    Then restart ComfyUI. The only dependency is xxhash>=3.0.0 - one line, no torch battles, no model files to download. Windows portable users can run the included install-portable.bat instead of the pip line.

    Where people get burned

    The most common "it doesn't work" is really "I don't see anything": an unconnected STRING output shows nothing in ComfyUI. Connect it to a text display or the FLUX2 field before judging. Second, remember determinism cuts both ways - if you keep the seed and prompt_index the same, you'll get the same description forever, which is the point, not a bug. And if you delete a profile it was using, the error text comes back inside the text output rather than failing loudly, so check the actual text if output looks wrong.

    CategoryZero2JSON/Subject

    Inputs (6)

    NameTypeDefaultDescription
    seedINT00–4294967295World seed for deterministic generation
    prompt_indexINT00–4294967295Position in infinite prompt space
    profileoptCOMBOsubject_description_default.jsonSelect vocabulary profile
    prefixoptSTRINGText to prepend to generated prompt
    suffixoptSTRINGText to append to generated prompt
    subject_typeoptCOMBOanyFilter generation by subject type

    Outputs (1)

    NameTypeDescription
    textSTRINGβ€”