Ideogram 4 LoRA Tagger
Get Ideogram 4 to caption its own training data
- final_prompt
Ideogram 4 wants a very particular kind of dataset caption. Not a sentence, not a Danbooru tag list - a JSON object with per-character bounding boxes, hex color palettes, lighting notes, camera info, and a strict rule that the trigger token does all the identity work and you never describe a known character's hair, eyes, or face. Writing that by hand for hundreds of images is misery. This node builds the instruction that makes a vision model do it for you.
Ideogram 4 LoRA Tagger is part of the Consistent Character Creator (CCC) toolset inside Mickmumpitz-Nodes. It doesn't caption anything itself - it's a prompt assembler. It produces one string, final_prompt, which is the complete system prompt you hand to a vision-language model (Qwen-VL, JoyCaption, whatever you caption with) along with each training image. The node's whole job is to package the captioning spec and your character roster into something the VLM can follow.
What it does
Think of it as a fill-in-the-blank template with two parts:
base_instruction- a long, editable JSON-spec prompt (the default is dense and opinionated: describe left to right, order elements byx_min, one object per bounding box, boxes normalized to 0–1000, hex palettes, the "forbidden rule" about permanent features, and the clothing rule).trigger_1throughtrigger_8, each with a matchingdesc_1throughdesc_8- your known-character roster. The trigger is the exact token the LoRA must learn; the desc is a recognition aid so the VLM can tell which face is which character.
The output final_prompt slots into the roster section of the spec and goes straight into your VLM's prompt input. The descs are what let a model look at a photo and know "that's Ma3hwaKang, not MagnusSt3rn."
Why it matters for your dataset
The LoRA-training rule that survives across every architecture: caption what you want to stay variable (pose, clothing, lighting) and leave what should be permanent undescribed, so the trigger token absorbs it. This node encodes that as a hard rule - the "forbidden rule" forbids the VLM from describing permanent physical features of any known character. That's the difference between an Ideogram LoRA that actually holds identity and one that drifts.
Inputs that matter
trigger_N/desc_N- fill as many pairs as you have known characters (up to 8). More than 8 known characters and you'll need to prioritize.base_instruction- leave it alone until you've seen what the VLM produces; tweak it when captions come back with boxes in the wrong place or too much meta-commentary.
Where it fits
Typical CCC pipeline: batch-load your training images, run Prompt Studio (or this tagger) → VLM → caption output, review, train. If your downstream tooling expects x-first boxes in absolute pixels instead of Ideogram's normalized y-first format, run the caption through the pack's BBox Converter node first - it rewrites every [a, b, c, d] box between the two conventions.
Installing
ComfyUI Manager, search "Mickmumpitz", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes
Dependencies are just numpy, Pillow, opencv-python. The tagger itself is pure string assembly - no API, no key, no model download. The VLM you pair it with is the only heavy thing, and that's your choice.
One honest warning: this produces structured JSON captions, which are great for training consistency but only if your captioner reliably emits valid JSON. If you get malformed output, tightening the desc fields and the base instruction usually fixes it faster than retraining anything.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| base_instruction | STRING | You are an expert image captioner for LoRA training datasets using Ideogram 4.0. Your output must be a single valid JSON object. Do not output plain text, markdown, or explanations. You will receive an image containing one or more known characters from the following list. Goal: write a detailed, structured CLEAN JSON caption used for Ideogram 4.0 LoRA training with placed bounding boxes, tagged characters and color-palette picks. CAPTIONING RULES: - Describe the image from left to right. - Always use the exact trigger keyword for each character present (no meta commentary). - Include a bounding box [x_min, y_min, x_max, y_max] for each character and key object, normalized to image dimensions (0-1000 range). - If multiple characters are present, list all of them under elements and in the high level description. - In every bounding box ONLY ONE character or text tag should be listed. The general composition and character interaction needs to be described in the high_level_description. Character/object pose or what a character/object is doing is described under the specific element. - Analyze and tag the color palette using hex codes. - For visible text, use "type": "text", put the exact string in the "text" field, and describe the typography in "desc". - Always describe the lighting conditions and how a character is lit in great detail, in the "high_level_description" and in the "lighting" section. - Always describe the exact camera angle, camera lens, camera exposure, and distance to character (medium, closeup, etc.) in the "photo" section. - Always describe the aesthetic of the image under the "aesthetics" tag. - Always state how the character is angled relative to the camera (Full Face / Frontal Shot: camera at 0 degrees, subject turned directly into the lens. Three-Quarter View: camera at ~30-45 degrees, the far ear is hidden but both eyes are visible. Three-Quarter Profile: camera at ~60-70 degrees, the nose tip stays inside the outline of the far cheek. Side Profile: camera at exactly 90 degrees, shows exactly one half of the face. Profil Perdu / Lost Profile: camera at ~110-120 degrees, subject turned slightly away, you see the back of the head and the outline of the cheek. Over-the-Shoulder: camera behind one person, capturing one subject's shoulder while framing the other. Full Back Shot: camera at 180 degrees, subject faces completely away). - Strict clean JSON, IMPORTANT: ONLY UTF-8 characters. - Do NOT use ```json fences. --- THE CLOTHING EVALUATION RULE (CRITICAL) --- When you identify a known character you should NOT describe their clothing or what they wear. --- THE FORBIDDEN RULE (APPLIES TO ALL SECTIONS) --- When you identify a known character, you are ALWAYS STRICTLY FORBIDDEN from describing this character's permanent physical features (hair, eyes, facial structure, cybernetics) that are listed below, regardless of what they wear. This applies globally to both "high_level_description" and "desc". The keyword alone replaces all physical traits. EXAMPLES OF THE CLOTHING RULE: - [SCENARIO]: 3mmaClarc is in the image, wearing her default green shirt. - [CORRECT OUTPUT]: "3mmaClarc is sitting on a chair, reading a book." (PASSED: completely ignored clothing, no meta-talk). - [INCORRECT OUTPUT]: "A character labeled as 3mmaClarc is wearing her default outfit." (FAILED: used meta-commentary). OPTIMAL FINAL CAPTION EXAMPLE: { "aspect_ratio": "16:9", "high_level_description": "A medium wide eye-level shot capturing Ma3hwaKang and MagnusSt3rn standing side-by-side in a dimly lit underground casino. Ma3hwaKang is reaching toward a green poker table in the center while MagnusSt3rn observes passively. High-contrast neon purple and gold rim lighting illuminates the subjects against deep shadows.", "compositional_deconstruction": { "background": "Left side features a glowing purple neon wall sign; center transitions into a dark, out-of-focus green poker table scattered with chips; right side fades into heavy shadows concealing silhouetted slot machines.", "elements": [ {"type": "text", "bbox": [50, 100, 200, 400], "desc": "Bright purple neon cursive tubing mounted on a dark brick wall.", "text": "Jackpot"}, {"type": "text", "bbox": [650, 450, 700, 550], "desc": "Small golden engraved plaque sitting on the edge of the poker table.", "text": "VIP"}, {"type": "obj", "bbox": [200, 500, 800, 950], "desc": "A classic green felt poker table in the center foreground, scattered with stacks of casino chips, playing cards, and a golden VIP plaque.", "color_palette": ["#006400", "#228B22", "#FFD700", "#FFFFFF", "#1A1A1A"]}, {"type": "obj", "bbox": [150, 250, 450, 950], "desc": "Ma3hwaKang leaning forward, extending her right arm toward the table, displaying a highly focused and intense facial expression.", "color_palette": ["#FF0000", "#8B0000", "#FFD700", "#1A1A1A"]}, {"type": "obj", "bbox": [550, 150, 900, 950], "desc": "MagnusSt3rn standing upright with a rigid, imposing posture and hands clasped behind his back, looking sharply to the left with a stoic, calculating expression.", "color_palette": ["#2F2F2F", "#1A1A1A", "#FFFFFF", "#FFD700"]} ] }, "style_description": { "medium": "photography", "aesthetics": "photoreal, cyberpunk, neo-noir, cinematic", "lighting": "Low-key neon lighting with a stark purple rim light hitting the subjects from the left, contrasted by a warm gold practical light illuminating them from the lower front-right.", "photo": "Eye-level medium wide shot, 35mm lens, f/1.8 aperture for shallow depth of field, focused symmetrically on the two subjects, captured on a digital cinema camera.", "color_palette": ["#4B0082", "#800080", "#FFD700", "#FF0000", "#1A1A1A", "#2F2F2F", "#0F0F0F"] } } | — |
| trigger_1opt | STRING | — | |
| desc_1opt | STRING | — | |
| trigger_2opt | STRING | — | |
| desc_2opt | STRING | — | |
| trigger_3opt | STRING | — | |
| desc_3opt | STRING | — | |
| trigger_4opt | STRING | — | |
| desc_4opt | STRING | — | |
| trigger_5opt | STRING | — | |
| desc_5opt | STRING | — | |
| trigger_6opt | STRING | — | |
| desc_6opt | STRING | — | |
| trigger_7opt | STRING | — | |
| desc_7opt | STRING | — | |
| trigger_8opt | STRING | — | |
| desc_8opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| final_prompt | STRING | — |