New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Debug a WRONG or imperfect render by inspecting inputs

Debugging renders with run-to-node

by artokun · MIT license · ★ 759 on GitHub · updated Sep 21

Debugging renders with run-to-node cover

Debug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node. Render one branch up to an output, preview-tap latents/masks/preprocessor maps, localize the first bad stage, then fix.

---
name: debug-render
description: Debug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node. Render one branch up to an output, preview-tap latents/masks/preprocessor maps, localize the first bad stage, then fix. Use when a final image/video completes but looks wrong, such as artifacts, wrong subject/pose/composition/color, blur, a ControlNet/IPAdapter/mask/LoRA not taking, or a two-stage refiner or upscale degrading the result. For errors/OOM/missing nodes use the troubleshooting skill.
---

# Debugging renders with run-to-node

When a final asset looks wrong (not when it errors), don't re-roll the whole
graph and hope. Localize the fault. Render only as far as one stage and look
at what that stage actually produces. The wrong-looking output is downstream of a
*first* bad step. Find that step, fix it there, and everything after it follows.

The tool for this is `panel_run` with `to_node_id` ("run to node"), which uses
ComfyUI's native partial execution. Only the target output node plus
everything upstream of it renders; every other branch is skipped. That makes each
probe fast and cheap, and the output is delivered to you automatically, same
as any run. Don't poll.

Overview

When a final asset looks wrong (not when it errors), don't re-roll the whole graph and hope. Localize the fault. Render only as far as one stage and look at what that stage actually produces. The wrong-looking output is downstream of a first bad step. Find that step, fix it there, and everything after it follows.

Manual install (npx, ZIP)
Claude Codenpx skills add artokun/comfyui-mcp --skill debug-render -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/artokun/comfyui-mcp/tar.gz/1d5b12b1b499 \ | tar -xz -C ~/.claude/skills --strip-components=3 comfyui-mcp-1d5b12b1b499/plugin/skills/debug-render
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/cefdf8cb1c87861bfe91/debug-render.zip" -OutFile "$env:TEMP\debug-render.zip"; Expand-Archive "$env:TEMP\debug-render.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md6.5 KB
Read the files here
artokun/1d5b12b1 file
SKILL.md
Show the full text111 lines

Debugging renders with run-to-node

When a final asset looks wrong (not when it errors), don't re-roll the whole graph and hope. Localize the fault. Render only as far as one stage and look at what that stage actually produces. The wrong-looking output is downstream of a first bad step. Find that step, fix it there, and everything after it follows.

The tool for this is panel_run with to_node_id ("run to node"), which uses ComfyUI's native partial execution. Only the target output node plus everything upstream of it renders; every other branch is skipped. That makes each probe fast and cheap, and the output is delivered to you automatically, same as any run. Don't poll.

When to reach for this

  • A final image/video is wrong: artifacts, wrong subject/pose/composition, off color, soft/blurry, melted hands, wrong style.
  • A conditioner isn't "taking" (ControlNet, IPAdapter, a mask, an inpaint, a LoRA) and you can't tell if the input to it is wrong or the node is wrong.
  • A multi-stage pipeline (base → refiner, txt2img → upscale, decode → post) degrades, and you need to see which stage introduces the problem.
  • You only want to test one branch of a multi-output graph without paying for the others.

If instead the run fails (red error, OOM, missing node, black image from a crash), use the troubleshooting skill. This skill is for outputs that complete but look wrong.

The one hard rule: to_node_id must be an OUTPUT node

ComfyUI can only run to an output node: SaveImage, PreviewImage, SaveVideo, SaveAudio, etc. (these show is_output: true in panel_query_graph detail rows). A bare KSampler / VAEDecode / preprocessor is not an output node, so you can't target it directly. To inspect a point that isn't already an output, add a preview tap there:

You want to see… Wire type Tap to add Wiring
An intermediate image (post-process, refiner stage, composite) IMAGE PreviewImage image → PreviewImage.images
A latent (after a sampler, before/after upscale) LATENT VAEDecode → PreviewImage latent → VAEDecode.samples; reuse the graph's VAE → VAEDecode.vae; then → PreviewImage
A mask (inpaint, segmentation, attention) MASK MaskToImage → PreviewImage mask → MaskToImage.mask → PreviewImage
A ControlNet/preprocessor map (depth/pose/canny) usually IMAGE already PreviewImage the preprocessor's IMAGE output → PreviewImage.images
The actual prompt/conditioning CONDITIONING (can't preview as an image) inspect widget values / the text node feeding it instead

Build a tap with panel_add_node + panel_connect, run to it, inspect, then panel_remove_node the tap when you're done (unless the user wants to keep it).

The loop

  1. Read the graph. panel_graph_outline (then panel_query_graph for specifics). Note node ids, the output nodes (is_output: true), and every node's mode. A node in bypass/mute on the path is OFF and is a top cause of wrong renders. Fix modes first with panel_set_node_mode before you blame anything else.
  2. Pick a probe point roughly in the middle of the suspect chain (bisect).
  3. Get an output there. Target an existing output node, or add a preview tap (table above).
  4. panel_run(to_node_id = that output node). Only that branch renders.
  5. Look at what's delivered. Is this stage already wrong, or still fine?
    • Still fine: move the probe downstream; the fault is later.
    • Already wrong: move the probe upstream; the fault is earlier.
  6. Repeat until you find the first stage whose output is bad. That node (or its inputs/widgets) is what to fix, via panel_set_widget, panel_set_node_mode, a rewire, or a different model. Then run-to-node there again to confirm the fix before running the full graph.
  7. Clean up temporary preview taps (panel_remove_node) and do a final full panel_run to produce the real saved asset.

Symptom → where to probe first

  • Whole image wrong subject/style. Preview the conditioning's source (the text/prompt node, the sampler's positive input via a decode of its latent).
  • ControlNet ignored / wrong structure. Preview the preprocessor map (the depth/pose/canny IMAGE going into the ControlNet). A blank or wrong map means the problem is the preprocessor or its input, not the sampler.
  • IPAdapter/reference not taking. Preview the reference image after any resize/crop the IPAdapter chain applies.
  • Inpaint/outpaint bleeding. MaskToImage-preview the mask actually reaching the sampler (mask misalignment is the usual culprit).
  • Refiner/upscale degrades it. Preview the base latent (VAEDecode tap) before the refiner vs after. If the base is good and the result is bad, the refiner/upscale stage is at fault.
  • Right content, bad quality only. The fault is late (sampler steps/cfg, VAE, post), so probe near the end first.

Gotchas

  • Output-node only. If you target a non-output node, the run is rejected with a message saying so. Add a preview tap instead.
  • Modes matter. A bypassed/muted node on the probed path silently changes what renders. Check modes in step 1.
  • Auto-delivery. The probe's output node fires an executed event and the image is delivered to you inline, including PreviewImage taps, which arrive labeled as a preview (temporary, not a saved file). Don't poll; just end the turn and read the delivered image. A preview tap with no SaveImage means "no saved output ran", which is expected for a probe.
  • Shared queue. Each run-to-node queues a real (small) job. Don't stack probes. Run one, read it, then the next.
  • Subgraphs. Output nodes nested inside a subgraph can't be targeted yet. Probe at the root graph (add the tap outside the subgraph, fed by an exposed output rail).

Sources

  • Official: comfyui-mcp panel_run to_node_id product behavior (this repo).
  • Empirical: probe-point recipes from observed wrong-render cases.
1---
2name: debug-render
3description: Debug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node. Render one branch up to an output, preview-tap latents/masks/preprocessor maps, localize the first bad stage, then fix. Use when a final image/video completes but looks wrong, such as artifacts, wrong subject/pose/composition/color, blur, a ControlNet/IPAdapter/mask/LoRA not taking, or a two-stage refiner or upscale degrading the result. For errors/OOM/missing nodes use the troubleshooting skill.
4---
5 
6# Debugging renders with run-to-node
7 
8When a final asset looks wrong (not when it errors), don't re-roll the whole
9graph and hope. Localize the fault. Render only as far as one stage and look
10at what that stage actually produces. The wrong-looking output is downstream of a
11*first* bad step. Find that step, fix it there, and everything after it follows.
12 
13The tool for this is `panel_run` with `to_node_id` ("run to node"), which uses
14ComfyUI's native partial execution. Only the target output node plus
15everything upstream of it renders; every other branch is skipped. That makes each
16probe fast and cheap, and the output is delivered to you automatically, same
17as any run. Don't poll.
18 
19## When to reach for this
20 
21- A final image/video is wrong: artifacts, wrong subject/pose/composition, off
22 color, soft/blurry, melted hands, wrong style.
23- A conditioner isn't "taking" (ControlNet, IPAdapter, a mask, an inpaint, a
24 LoRA) and you can't tell if the *input* to it is wrong or the *node* is wrong.
25- A multi-stage pipeline (base → refiner, txt2img → upscale, decode → post)
26 degrades, and you need to see which stage introduces the problem.
27- You only want to test one branch of a multi-output graph without paying for
28 the others.
29 
30If instead the run fails (red error, OOM, missing node, black image from a
31crash), use the troubleshooting skill. This skill is for outputs that
32*complete* but look wrong.
33 
34## The one hard rule: `to_node_id` must be an OUTPUT node
35 
36ComfyUI can only run *to* an output node: SaveImage, PreviewImage, SaveVideo,
37SaveAudio, etc. (these show `is_output: true` in `panel_query_graph` detail rows). A bare
38KSampler / VAEDecode / preprocessor is not an output node, so you can't target
39it directly. To inspect a point that isn't already an output, add a preview
40tap there:
41 
42| You want to see… | Wire type | Tap to add | Wiring |
43|---|---|---|---|
44| An intermediate image (post-process, refiner stage, composite) | IMAGE | `PreviewImage` | image → `PreviewImage.images` |
45| A latent (after a sampler, before/after upscale) | LATENT | `VAEDecode` → `PreviewImage` | latent → `VAEDecode.samples`; reuse the graph's VAE → `VAEDecode.vae`; then → `PreviewImage` |
46| A mask (inpaint, segmentation, attention) | MASK | `MaskToImage` → `PreviewImage` | mask → `MaskToImage.mask` → `PreviewImage` |
47| A ControlNet/preprocessor map (depth/pose/canny) | usually IMAGE already | `PreviewImage` | the preprocessor's IMAGE output → `PreviewImage.images` |
48| The actual prompt/conditioning | CONDITIONING | (can't preview as an image) | inspect widget values / the text node feeding it instead |
49 
50Build a tap with `panel_add_node` + `panel_connect`, run to it, inspect, then
51`panel_remove_node` the tap when you're done (unless the user wants to keep it).
52 
53## The loop
54 
551. **Read the graph.** `panel_graph_outline` (then `panel_query_graph` for specifics). Note node ids, the output nodes
56 (`is_output: true`), and every node's mode. A node in `bypass`/`mute` on
57 the path is OFF and is a top cause of wrong renders. Fix modes first with
58 `panel_set_node_mode` before you blame anything else.
592. **Pick a probe point** roughly in the middle of the suspect chain (bisect).
603. **Get an output there.** Target an existing output node, or add a preview tap
61 (table above).
624. **`panel_run(to_node_id = that output node)`.** Only that branch renders.
635. **Look at what's delivered.** Is *this* stage already wrong, or still fine?
64 - Still fine: move the probe downstream; the fault is later.
65 - Already wrong: move the probe upstream; the fault is earlier.
666. Repeat until you find the first stage whose output is bad. That node (or
67 its inputs/widgets) is what to fix, via `panel_set_widget`, `panel_set_node_mode`,
68 a rewire, or a different model. Then run-to-node there again to confirm the fix
69 before running the full graph.
707. **Clean up** temporary preview taps (`panel_remove_node`) and do a final full
71 `panel_run` to produce the real saved asset.
72 
73## Symptom → where to probe first
74 
75- **Whole image wrong subject/style.** Preview the conditioning's source (the
76 text/prompt node, the sampler's positive input via a decode of its latent).
77- **ControlNet ignored / wrong structure.** Preview the preprocessor map
78 (the depth/pose/canny IMAGE going into the ControlNet). A blank or wrong map means
79 the problem is the preprocessor or its input, not the sampler.
80- **IPAdapter/reference not taking.** Preview the reference image after any
81 resize/crop the IPAdapter chain applies.
82- **Inpaint/outpaint bleeding.** `MaskToImage`-preview the mask actually reaching
83 the sampler (mask misalignment is the usual culprit).
84- **Refiner/upscale degrades it.** Preview the base latent (VAEDecode tap)
85 *before* the refiner vs after. If the base is good and the result is bad, the
86 refiner/upscale stage is at fault.
87- **Right content, bad quality only.** The fault is late (sampler steps/cfg, VAE,
88 post), so probe near the end first.
89 
90## Gotchas
91 
92- **Output-node only.** If you target a non-output node, the run is rejected with
93 a message saying so. Add a preview tap instead.
94- **Modes matter.** A bypassed/muted node on the probed path silently changes what
95 renders. Check modes in step 1.
96- **Auto-delivery.** The probe's output node fires an `executed` event and the
97 image is delivered to you inline, including PreviewImage taps, which arrive
98 labeled as a *preview* (temporary, not a saved file). Don't poll; just end the
99 turn and read the delivered image. A preview tap with no SaveImage means "no
100 saved output ran", which is expected for a probe.
101- **Shared queue.** Each run-to-node queues a real (small) job. Don't stack
102 probes. Run one, read it, then the next.
103- **Subgraphs.** Output nodes nested inside a subgraph can't be targeted yet.
104 Probe at the root graph (add the tap outside the subgraph, fed by an exposed
105 output rail).
106 
107## Sources
108 
109- **Official:** comfyui-mcp `panel_run` to_node_id product behavior (this repo).
110- **Empirical:** probe-point recipes from observed wrong-render cases.
111 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 759
Checked
Source
artokun/comfyui-mcp ↗
Creator
artokun · 44 listings
View creator

Similar skills

See all →
SkillExtract text, tables, metadataXberg Document Extractionxberg-io/xberg · by xberg-ioExtract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg. Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output format), batch processing, error handling, and plugins.★ 9.4k GitHub starsSkillMove code from one implementation to another functionCode migrationkucherenko/jscpd · by kucherenkoMove code from one implementation to another function by function, tests first and code second, and check two implementations of one app for parity, with jscpd --compare as the progress measure and a coverage map binding each function to its tests. Use when porting a library or app to another language or framework (Java to Kotlin, JavaScript to Rust, a Python library to TypeScript, an iOS app to Android), when asked what is left to port, or when comparing the Android and iOS versions of an app.★ 6.3k GitHub starsSkillManages Ahrefs API usage in Python using ahrefs-pythonOpenClaudia/openclaudia-skills · by OpenClaudiaManages Ahrefs API usage in Python using `ahrefs-python` library. Use when working with SEO / marketing related tasks or with data including backlinks, keywords, domain ratings, organic traffic, site audits, rank tracking, and brand monitoring. Covers `ahrefs-python` usage including AhrefsClient / AsyncAhrefsClient, typed request/response models, error handling, and all API sections.★ 705 GitHub starsMCPDocx LLM translatoradeudealfluence/adeu · by dealfluenceDocx ↔ LLM translator. Projects .docx office files to Markdown for editing. Projects edits back to OOXML as tracked changes (redlines). Python and Node.js implementations.★ 165 GitHub starsSkillCreate an Amazon-compliant white-background main imageAmazon White-Background Main Image · 亚马逊白底主图xianyu110/ecommerce-image-skills · by xianyu110Create an Amazon-compliant white-background main image (pure #FFFFFF background, product fills ≥85% of the frame, no text, props or watermark) from a product photo with GPT Image 2.5, then verify it with a Python check script. Use for Amazon/Walmart/eBay main images, 白底图, 白底主图, hero image, listing main photo.★ 92 GitHub starsMCPOfficial monorepo of SDKs, CLISendmux sdkSendmux/sendmux-sdk · by SendmuxOfficial monorepo of SDKs, CLI, and MCP servers for Sendmux email APIs across TypeScript, Python, Go, PHP, Rust, and Ruby.★ 65 GitHub stars

More from artokun

SkillTrain custom LoRAs with ostris AI-ToolkitAI-Toolkit LoRA Trainer (WAN 2.2 & Z-Image)artokun/comfyui-mcp · by artokunTrain custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.★ 759 GitHub starsSkillAnime/illustration text-to-imageANIMA 1.0 (Anima Base Ultra) Text-to-Image Workflowsartokun/comfyui-mcp · by artokunAnime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags + natural language; runs/trains on <6GB VRAM; includes anime inpainting via Anima-LLLite ControlNet★ 759 GitHub starsSkillAuthoring & Publishing ComfyUI Custom Nodesartokun/comfyui-mcp · by artokunAuthoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml spec, comfy-cli publishing, and CI★ 759 GitHub starsSkillTrain a custom anime LoRA on the ANIMA base modelCitron Anima LoRA Trainerartokun/comfyui-mcp · by artokunTrain a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM, character/style LoRAs; covers setup, dataset prep, training params, and using the result in the anima-base workflow★ 759 GitHub starsSkillDiscover Civitai models with the BUILT-IN downloadmodelCivitai + comfyui-mcpartokun/comfyui-mcp · by artokunDiscover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a checkpoint/LoRA/embedding on Civitai, download it into ComfyUI, and use its trigger words. Optionally pair the official Civitai MCP for community features (images browsing, posting, collections).★ 759 GitHub starsSkillDiagnose and fix video/image color OBJECTIVELYColor Correction (measure, don't eyeball)artokun/comfyui-mcp · by artokunDiagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white points, contrast, saturation, clipping, cast) instead of eyeballing a contact sheet. Covers the "washed out" signature, why reference color-match (mkl/ColorMatch/ColorMatchAdobe) CAN'T add contrast a flat source lacks, the levels/contrast-stretch fix (core AdjustContrast / CurveEditor), the measure→fix→re-measure loop, the side-by-side sandbox pattern, and where to place the fix in a render graph (after decode, before save). Use when a render looks washed out / flat / dull / over-saturated / color-cast, or when deciding between a color-match and a contrast/levels fix.★ 759 GitHub stars