Workflow Parse (graph to values)
Turn a workflow PNG into typed numbers you can wire up
- positive
- negative
- steps
- cfg
- sampler_name
- scheduler
- seed
- width
- height
- denoise
- model
- loras_json
- result
- parsed
- missing
- info
You found a great image online (or an old one of yours) and you want its settings - not the human-friendly "what did I prompt," but the actual numbers: seed, steps, cfg, sampler, scheduler, width, height, the model name, even the LoRAs. Workflow Parse is the node that walks a ComfyUI prompt graph and hands you those as real INT/FLOAT/STRING outputs. Wire it after Workflow From Image (or paste the JSON directly) and you get a KSampler's worth of settings you can actually plug into a live graph.
The mechanism is the part that's easy to underestimate. You might assume it greps the JSON for a KSampler node and reads its inputs - but the README's install data shows that real graphs here are dominated by SamplerCustomAdvanced (1031 of the sampler nodes) with plain KSampler a distant third (51). So the walk follows the sampler's own links - guider, sigmas, noise - instead of matching a class name, and everything not on that path is picked up by a graph-wide scan. Values that hide behind links get resolved transitively: noise_seed often points at a PrimitiveInt, and CLIPTextEncode.text at a string node, so links are followed until a literal falls out. Node IDs are strings and can be subgraph-namespaced ("29:39"). Measured across 400 real graphs with zero exceptions, seed, sampler, model and steps came back 129/129; cfg 96%; width/height 75%.
Inputs
json_text is required - the prompt chunk, wired in from Workflow From Image or pasted by hand. The defaults (default_steps, default_cfg, default_width, default_height, default_sampler, default_scheduler) are the fallbacks when a value isn't in the graph.
Outputs
positive, negative (STRING), steps, cfg, seed, width, height, denoise, model (STRING), loras_json (STRING, a JSON array of the LoRAs with their names), and the typed sampler_name/scheduler constrained to ComfyUI's real lists. Plus the useful machinery: result is a NEEDLE_RESULT-shaped object so Needle Get Field reads any key without its own slot; parsed (BOOLEAN) tells you whether the graph was walked at all; and missing (STRING) names everything that was not in the graph.
That last one is the design point. The whole guarantee of this node is that a default never quietly passes itself off as a recovered setting. If denoise, sampler_name and model were genuinely absent, missing says so - the README's example output shows exactly that. If you're reusing settings, read missing first; it tells you which numbers you're about to trust that were actually invented for you.
Where it gets honest about limits
The gaps are the workflows, not the parser. Sigma-driven graphs (ManualSigmas) have no steps input at all, so the count is derived from the length of the sigma schedule. Latent sizes are often computed at runtime via GetImageSize, so no literal exists to read. Multi-pass graphs share nodes - a two-stage workflow has two samplers whose conditioning chains overlap - so the walk goes back from the output node to find the pass that actually produced the file, and reports sampler_passes in the info when there's more than one. And when a graph builds its prompt at runtime, positive comes back empty with a note rather than a random unrelated text node - that's where Workflow Texts takes over.
Install
ComfyUI Manager (search ComfyUI Needle 2) or git clone https://github.com/DenRakEiw/Comfyui_Needle2 + pip install cactus-needle, restart. This node uses no model - a workflow graph is exact structured data, and a 45M model squinting at JSON through a 256-token window would be strictly worse. It'll run fine even where the engine can't.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| json_text | STRING | The `prompt` chunk. Wire in Workflow From Image, or paste it. | |
| default_stepsopt | INT | 201–1000 | — |
| default_cfgopt | FLOAT | 7.00–100 | — |
| default_widthopt | INT | 102416–16384 | — |
| default_heightopt | INT | 102416–16384 | — |
| default_sampleropt | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| default_scheduleropt | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
Outputs (16)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| negative | STRING | — |
| steps | INT | — |
| cfg | FLOAT | — |
| sampler_name | euler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2 | — |
| scheduler | simple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal | — |
| seed | INT | — |
| width | INT | — |
| height | INT | — |
| denoise | FLOAT | — |
| model | STRING | — |
| loras_json | STRING | — |
| result | NEEDLE_RESULT | — |
| parsed | BOOLEAN | — |
| missing | STRING | — |
| info | STRING | — |