Nodes/ComfyUI-DAELab-Custom-Nodes-Library/GPT Image 2 材质提示词
ComfyUI Node

GPT Image 2 材质提示词

A materials menu that refuses to touch your colors

By TeutonicMepheles·Created 4 months ago·Updated 3 days ago· 0
GPT Image 2 材质提示词
    • prompt
    • material_semantics
    • preview_image
    ◄material_id烤漆►
    ◄base_prompt►
    ◄additional_details►

    Ask a model for "a badge in brushed gold" and it will give you a gold badge in a gold-shop palette, with the lettering re-rendered and the ring redesigned. The information you actually wanted - metalness, roughness, reflection - arrives buried in a pile of colour changes you didn't ask for.

    This node separates the two. GPT Image 2 材质提示词 is a materials picker that writes a long, structured English edit prompt about surface physics only, and explicitly locks every colour in your reference image. It generates no image, calls no API, and has no colour input at all - by design, not by omission.

    What it does

    material_id selects from a catalogue defined in web/materials.json and previewed as 1:1 rounded-square swatches in the node panel. In this build the dropdown samples: 烤漆 (baked enamel), 透明漆 (clear lacquer), 亚金 (matte gold), 亚银 (matte silver), 闪粉 (glitter), 水钻 (rhinestone). The panel shows one enlarged 1:1 viewport of the current pick above a fixed four-by-two grid of thumbnails.

    From that ID it emits two strings.

    prompt is the full edit instruction: image responsibilities, what to modify, what must be preserved, what is forbidden. It consistently declares that material controls only optical response and material-scale microstructure and does not create macro relief height - so a glitter region can have micro-texture but cannot become a new badge tier. It also pins the height-stage artefacts: the outer silhouette, contour lines, letter strokes and metal dividers must survive any material, un-flattened. Your base_prompt (an optional description of the target area) is inserted as an "edit target" section, and only if you actually filled it in; additional_details gets appended for one-off requirements.

    material_semantics is the reusable half: just the material's physical description plus the colour-lock instruction, with no hex values, no sRGB, no "target tone". The lock explicitly covers hue, saturation and base lightness, and bans global or regional exposure, gamma, contrast, tone-mapping, white balance and brightness drift. That's the piece you feed to a second GPT Image 2 node when you're doing the pack's two-stage badge render: Image 1 is the coloured base render, Image 2 is your original flat colour-block artwork, and the material stage only overwrites the surface response of the selected region.

    preview_image is the swatch. Gold and silver keep their metal colour; everything else is converted to grayscale server-side precisely so the preview can't be mistaken for a target colour. It is not sent to the API by this node - the prompt never references it. If you decide to wire a material reference image into your GPT node yourself, update the prompt to describe that input's number and role, or you'll have two images and one ambiguous instruction.

    The absence of colour controls is the feature

    The README is emphatic about this and it's the most useful thing to understand before you buy into the workflow: there is no colour switch, no colour input, no picker. Loading an old workflow that had them drops the old colour values and switch state. Material is physics; colour lives in your flat artwork and gets locked to it.

    Once that clicks, the design makes sense. You pick gloss level and surface, not palette. Two regions of the same height with different materials share the same nominal carrier surface and must read as clearly bounded; connected regions of the same material and height must not invent seams or ridges of their own. That's a lot of negative-space instruction, and it's the kind of thing you only get by generating prompts from a catalogue instead of typing them.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/TeutonicMepheles/ComfyUI-DAELab-Custom-Nodes-Library.git
    

    Restart ComfyUI and refresh the browser - the thumbnail grid and viewport are front-end assets under web/, and web/material_thumbs/ holds the sample images. Clone the whole repo; the root __init__.py registers the class and WEB_DIRECTORY serves the panel.

    Adding a material is a data edit, not a code edit: drop a preview image into web/material_thumbs/, add a stable ID to web/materials.json with label, thumbnail, semantic, application and avoid, restart. Keep the shape and background of the sample swatch neutral - the README warns against describing an object or a studio setup in semantic, because that's how you get the model rendering a photo of a material sample instead of applying it.

    Gotchas

    The node's prompt output has to be wired into your GPT Image 2 node's prompt input. There's no hidden connection; people queue, get an unchanged image, and assume the node is broken when in fact they left the prompt socket empty.

    base_prompt defaulting to empty is intentional. Leave it blank for a whole-surface material pass; fill it when you're targeting one region.

    Finally, don't use it as a general prompt enhancer for non-badge work. The prohibitions are badge-specific - relief heights, enamel tiers, locked artwork geometry. On a portrait or a vehicle render they'd be actively harmful.

    What this is not

    It's a prompt builder. It spends nothing and produces no pixels beyond the local swatch. The billable part is the native GPT Image 2 node you connect behind it, and that runs on your Comfy account credits.

    CategoryGPT-Image/Prompt

    Inputs (3)

    NameTypeDefaultDescription
    material_idCOMBO烤漆6 options: 烤漆, 透明漆, 亚金, 亚银, 闪粉, 水钻
    base_promptSTRING—
    additional_detailsSTRING—

    Outputs (3)

    NameTypeDescription
    promptSTRING—
    material_semanticsSTRING—
    preview_imageIMAGE—