Nodes/MKRShift_Nodes/Nuke Image Output
ComfyUI Node

Nuke Image Output

The Nuke handoff node that just writes a PNG — and that's the whole point

By criskb·Created 7 months ago·Updated 5 months ago· 0
Nuke Image Output
  • images
  • written_paths_json
  • primary_path
  • summary_json
image_output_plan_json{}
filename_override

MKRNukeImageOutput is the "write side" of the Nuke roundtrip lane in MKRShift Nodes. It takes the images your graph generated and writes them to a file path, exactly where the Nuke-side bridge addon is looking for them. Nothing magical happens here - and that's the design. It's a dead-simple file write that makes a much bigger workflow possible.

Here's the mental model. The pack splits every host handoff into two halves. A plan node (MKRNukeImageOutputPlan) produces JSON describing where a file should land, what it's for, and how the host should consume it. Then an output node like this one actually writes the pixels. ComfyUI never talks to Nuke directly, and it never will - the ComfyUI side of the bridge is just filesystem I/O. The Nuke addon (a menu.py + bridge panel + gizmo that ships in the repo under addons/nuke/) watches that path and does the importing. When people say this pack "connects" ComfyUI to Nuke, this node is the mechanical reality behind that sentence: write a file where the other app can see it.

The inputs that matter

  • images - your IMAGE tensor, typically from a VAE decode. A batch of frames becomes a sequence (name_0000.png, name_0001.png...), which is handy when you're sending a plate sequence rather than a single still.
  • image_output_plan_json - the JSON plan from MKRNukeImageOutputPlan. Wire the plan node's image_output_plan_json straight in here. The asset_path inside the plan is where your file gets written; if it's {} or empty, the node warns and falls back.
  • filename_override (optional) - if you set this, it beats whatever path the plan specified. Useful when you're iterating and don't want to rebuild the plan every time.

Under the hood it parses the plan, makes sure the target directory exists, and saves each frame. If the target path has a non-PNG suffix it warns and writes PNG anyway - so don't expect it to produce an EXR for you.

The outputs

  • written_paths_json - every path it actually wrote, plus the plan it used.
  • primary_path - the first file written. This is the one to feed to anything downstream that needs "the path of the thing."
  • summary_json - host, apply_mode, image_role, count, and any warnings.

Where this sits in a real workflow

Generate plate → MKRNukeImageOutputPlan (set asset_path to something on your shared render drive, apply_mode to read_node) → MKRNukeImageOutput → in Nuke, the bridge panel picks the file up as a Read. The primary_path output is genuinely useful: you can pipe it into other string-based nodes for logging or manifests.

Installing and gotchas

MKRShift Nodes installs like any pack - ComfyUI Manager, search "MKRShift", or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Then restart ComfyUI. No requirements.txt, no model downloads, nothing heavy - it's pure numpy/PIL/torch code. The only thing that can bite you: this node writes to the asset_path from the plan, and if that path doesn't exist yet the pack creates it for you, but if it's on a network share the Nuke side needs permission to read it too. Also remember the ComfyUI side never touches Nuke - if you run the graph and nothing appears in Nuke, the bridge panel/addon isn't the thing that's broken; it's usually that the path isn't shared or the addon isn't pointing at it. The node's summary_json tells you exactly where the file landed, which settles most "where did it go" panics in one glance.

CategoryMKRShift Nodes/Addons/Nuke

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
image_output_plan_jsonSTRING{}
filename_overrideoptSTRING

Outputs (3)

NameTypeDescription
written_paths_jsonSTRING
primary_pathSTRING
summary_jsonSTRING