Nodes/ComfyTV/Material
ComfyUI Node

Material

Build a PBR material — or let a vision model guess it from a photo

By jtydhr88·Created 3 months ago·Updated about 16 hours ago· 725
Material
  • image
  • material
  • image
force_run_token0
project_id
parent_output_id0
workflowQwen3-VL 8B Estimate
material_state{}
captured_image
custom_params{}

Material is the part of ComfyTV's 3D side that makes generated geometry actually look like something. A mesh without a material is grey plastic; this stage is where you give it a physically-based surface - color, metalness, roughness, transmission, all of it - in an editor inside the node body, and hand the finished material to a Scene3D stage for rendering. What makes it worth a whole article is the shortcut: connect a photo and it can run a vision-language model to estimate the PBR parameters for you.

ComfyTV is the canvas-style app layer on ComfyUI where every operation is its own node. Material lives in the Input category because it's a producer - it creates a COMFYTV_MATERIAL that downstream 3D stages consume, plus a material-ball preview image.

How it works. The node body embeds a material editor that edits a material_state JSON (color/metalness/roughness/transmission/opacity/clearcoat/ior/emissive, etc.) and renders a preview of the material on a ball. Nothing exotic there. The clever path: wire an image in (the docs suggest a part cutout from Split Parts) and the workflow combo runs a VLM workflow - default Qwen3-VL 8B Estimate - that looks at the patch and returns a JSON block of PBR parameters, which get merged into the editor for you to fine-tune. So the flow is: cut out the material you want to match → let the VLM estimate it → nudge the sliders → hand the result to your 3D scene.

The inputs that matter. The force_run_token, project_id, parent_output_id, material_state, captured_image and custom_params inputs are all internal plumbing - driven by the editor and project store. The two you touch:

  • workflow - which VLM workflow estimates PBR params when an image is connected (default Qwen3-VL 8B Estimate).
  • image (optional) - the patch to estimate from.

Outputs are material (a COMFYTV_MATERIAL, what you feed a 3D render stage) and image (the material-ball preview, which doubles as a visual handoff).

Install. Install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Restart ComfyUI (full restart, not a browser refresh) and the stage appears under ComfyTV → Input. ComfyUI Manager - search "ComfyTV" - works too. Zero Python dependencies (the pack's pyproject.toml dependency list is empty). But the estimate workflow is not free: it needs qwen3vl_8b_fp8_scaled.safetensors (a Comfy-Org file) in models/clip/ or models/text_encoders/ - see the pack's docs/models.md. Skip the image connection and the manual editor needs nothing at all. Desktop/multi-install users: clone into the running instance's path from the startup log or the node won't register.

Where people get burned. Forgetting the Qwen text encoder file - the estimate workflow just won't run without it, and the error can read like a broken node rather than a missing model. Second: the estimate is a starting point, not a finish - it reads a photo of a material, so specular/roughness guesses on glossy or textured patches are approximate; treat the sliders as your authority. And don't expect a material to be complete from a single estimate: transmission (for glassy things) and emissive often need manual work. One nice detail the pack is upfront about: the author evaluated a gemma4 alternative for the estimate workflow and rejected it because it returned identical grey estimates for visibly different patches - i.e., the default Qwen path is the one where the image actually influences the answer.

CategoryComfyTV/Input

Inputs (8)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
workflowCOMBOQwen3-VL 8B EstimateVLM workflow used to estimate PBR parameters when an image is connected.
material_stateSTRING{}Internal — PBR material JSON (color/metalness/roughness/transmission/…). Driven by the material editor in the node body.
captured_imageSTRINGInternal — /view URL of the material-ball preview snapshot. Written by the node body; becomes the `image` output.
custom_paramsSTRING{}Internal — JSON of user-defined parameter attachments/values for this node.
imageoptCOMFYTV_IMAGE

Outputs (2)

NameTypeDescription
materialCOMFYTV_MATERIAL
imageCOMFYTV_IMAGE