ComfyUI for Agentic (HDRI + Beautify)

August 4, 2026 · View on GitHub

Optional local service for Generate HDRI From Prompt and Beautify Last Render. The renderer works fine without it.

Overview

You run three things:

  1. ComfyUI — the image generator.
  2. The bridge — a small Python helper that connects the renderer to ComfyUI.
  3. The renderer itself.

Open the renderer's Agentic window (F7): two lights show whether the Bridge and ComfyUI are up, and generation enables once both are green. The window also has a Copy start command button and a link back to this guide.

Quick path: install ComfyUI + models (§2) → start ComfyUI → start the bridge (§3) → generate. Read on for the details.

Adjust paths if your install differs:

Default
ComfyUID:\tools\ComfyUI_windows_portable
RepoD:\src\nvpro-samples\vk_gltf_renderer
Bridge_bin\Release\agentic_bridge (or _bin\Debug\agentic_bridge)
ComfyUI URLhttp://127.0.0.1:8188
Python (PNG→HDR)D:\tools\ComfyUI_windows_portable\python_embeded\python.exe

1. Install ComfyUI

  1. ComfyUI portable (Windows, NVIDIA) → extract so run_nvidia_gpu.bat exists.
  2. Run update\update_comfyui_and_python_dependencies.bat once.
  3. Start run_nvidia_gpu.bat — browser should open http://127.0.0.1:8188. Leave ComfyUI running.

ComfyUI on first launch

Create under ComfyUI\models\ if missing: diffusion_models\, text_encoders\, vae\ — the three folders the workflow loaders read from.


2. Download models

Filenames and folders must match exactly or loaders show Value not in list.

These are large downloads. The HDRI (Flux) set alone is roughly 35 GB (flux1-dev ~24 GB, t5xxl_fp16 ~10 GB); the Beautify set adds several GB more, and the optional 4× upscale models a few GB on top. Sizes are approximate — check each source page. Plan disk space and download time accordingly.

Beautify (always)

FileFolder
flux-2-klein-base-4b-fp8.safetensorsdiffusion_models\
qwen_3_4b.safetensorstext_encoders\
flux2-vae.safetensorsvae\

HDRI (Flux)

FileFolder
flux1-dev.safetensorsdiffusion_models\
ae.safetensorsvae\
clip_l.safetensorstext_encoders\
t5xxl_fp16.safetensorstext_encoders\

Direct downloads (paths match ComfyUI Flux examples):

Alternative for flux1-dev.safetensors: black-forest-labs/FLUX.1-dev (requires Hugging Face login + license acceptance; use ComfyUI model manager if the browser download fails).

Only if you enable “High-res 4× upscale” in the Agentic window (off by default) — also add:

FileFolder
pid_flux1_1024_to_4096_4step_bf16.safetensorsdiffusion_models\
gemma_2_2b_it_elm_bf16.safetensorstext_encoders\

(pixel_space VAE is provided by ComfyUI — no extra download.)

Press R in ComfyUI (or restart) after adding files.


3. Run everything

You need three processes:

#WhatHow
AComfyUIrun_nvidia_gpu.bat
BRenderervk_gltf_renderer.exeAgentic window (F7). It shows two lights, Bridge and ComfyUI; generation enables once both are green. (Bridge folder / polling live under Advanced.)
CAdapterSecond terminal (command below)

Start the adapter (step C). In the Agentic window (F7), click Copy start command — it fills in your paths — then paste and run it in a second terminal. Prefer this over typing paths by hand.

Only if that button is unavailable, adapt the template below: replace every D:\… path with yours, and match your build (_bin\Release or _bin\Debug).

cd /d D:\src\nvpro-samples\vk_gltf_renderer
python utils\comfy_bridge\comfy_bridge.py ^
  --bridge-root _bin\Release\agentic_bridge ^
  --workflow-dir utils\comfy_bridge\workflows ^
  --comfy-url http://127.0.0.1:8188 ^
  --converter-python "D:\tools\ComfyUI_windows_portable\python_embeded\python.exe"

Status dot: green = adapter OK, red = start step C.

Workflow JSON is copied next to the exe on build (utils\comfy_bridge\workflows\).

Verify before you generate

Confirm each piece before the first (slow) generation:

CheckHow
ComfyUI upBrowser opens http://127.0.0.1:8188, or curl http://127.0.0.1:8188/system_stats returns JSON
Models in placeEvery file from §2 sits in the exact folder (diffusion_models\ / text_encoders\ / vae\); press R in ComfyUI after adding files
Adapter runningThe second terminal shows comfy_bridge.py polling, with no traceback
Both lights greenBridge and ComfyUI in the Agentic window (F7) are green — generation enables only then

Any red? See Troubleshooting.


4. Use it

HDRI

  1. Edit the HDRI prompt (multiline box).
  2. High-res 4× upscale — both output 4096×2048 (1024×512 generation, 4× upscale). Off by default → hdri_from_prompt.json, bicubic upscale (no extra models). On → hdri_from_prompt_4x.json, model-based PixelDiT upscale (needs the extra models above).
  3. Steps/seed apply to both HDRI and Beautify.
  4. Generate HDRI from prompt (enabled once the adapter dot is green) → progress bar while ComfyUI runs → status HDRI appliedagentic_bridge\assets\<job_id>.hdr.

Beautify

  1. Render a scene in the viewport.
  2. Edit the Beautify prompt; set steps/seed if needed.
  3. Beautify last render (enabled once the adapter dot is green) → Beautified output displayedassets\<job_id>_beautified.png (same size as the viewport capture).

Troubleshooting

ProblemCheck
Value not in listModel name/path in §2
Red adapter dotAdapter command (§3C) running
Comfy not reachableComfyUI on 127.0.0.1:8188
HDRI / png_to_hdr / PIL--converter-python = Comfy portable python.exe
Job failedagentic_bridge\responses\<job_id>.jsonmessage
Stuck on “Waiting”Adapter must run comfy_bridge.py; live progress is .job_progress\<job_id>.json
curl http://127.0.0.1:8188/system_stats
dir _bin\Release\agentic_bridge\responses

Keep ComfyUI on localhost only — do not expose with --listen on untrusted networks.

Prompts

Ready-made prompts for both HDRI and Beautify ship in utils/comfy_bridge/prompts.json (copied next to the executable). They appear in the Presets dropdown in each prompt box of the Agentic window — pick one, then edit it freely. Beautify presets include photorealistic plus stylized looks (pencil sketch, blueprint, cartoon, watercolor, clay); HDRI presets cover a few times of day and settings.

To customize, edit that file (add entries under hdri / beautify as { "name": …, "prompt": … }; they load at startup), or drop a copy at <bridge>/prompts.json to override per project. The first beautify entry mirrors the app's built-in default.

Tip: the beautifier runs Flux.2 Klein at CFG 1 (the distilled model's intended value); higher CFG over-saturates toward the CGI look. Avoid particle words like "dust" — Flux may render them as floating flakes.