Enhanced Preview Bridge with optional mask input, 3-layer mask editing, and workflow orchestration. Part of the DazzleNodes collection.
Accepts IMAGE input with optional MASK. Preview images, draw masks in MaskEditor, and control workflow execution with configurable blocking.
Accepts LATENT + VAE input. VAE decodes for preview display while the original latent passes through unmodified. Extracts noise_mask from LATENT as upstream mask, with optional write-back via inject_noise_mask.
- Optional Mask Input: Accept masks from upstream nodes (LoadImage, SAM, detection nodes)
- 3-Layer Mask Editing: Input mask (red), editor drawings (orange), subtractions (erased areas)
- Configurable Output: Choose between combined, input_mask, or mask_editor output modes
- Instant Preview Refresh: Preview updates immediately when changing display mode widgets
- Mask Restoration: Persist masks across image changes (never, always, if_same_size)
- Smart Blocking: Block execution based on mask state (never, if_empty_mask, if_empty_editor, always)
- Latent Support: Preview latents with VAE decode, edit noise masks, pass through unmodified
- Dazzle Command Integration: Optional DAZZLE_SIGNAL input for play/pause gate control. Multi-DazzleCommand workflows supported — each PBE reads its own connected DC's state
- Cache-Compatible Previews: Deterministic filenames prevent cache invalidation. Downstream nodes (KSampler, VAEEncode) correctly cache when PBE's input hasn't changed
Search for "Preview Bridge Extended" in ComfyUI Manager, or use the CLI:
comfy node registry-install comfyui-preview-bridge-extendedIncluded automatically in the DazzleNodes aggregate package (also available in ComfyUI Manager)
cd ComfyUI/custom_nodes
git clone https://github.com/DazzleNodes/ComfyUI-PreviewBridgeExtended.git- Connect an IMAGE output to the node
- Optionally connect a MASK to
mask_opt - Open MaskEditor to draw/edit masks
- Set
blockmode to control downstream execution
- Connect LATENT + VAE to the node
- The latent is decoded for preview only
- Edit the noise mask in MaskEditor
- Enable
inject_noise_maskto write the mask back into LATENT output
Connect Dazzle Command (v0.2.3+) signal output to the dazzle_signal input. Play/pause toggles control blocking behavior automatically. Multiple DazzleCommand + PBE pairs operate independently in the same workflow.
| Widget | Options | Default | Description |
|---|---|---|---|
| mask_output | combined, input_mask, mask_editor | combined | What goes to the output MASK slot |
| editor_target | combined, mask_editor, input_mask | combined | Which layer MaskEditor affects |
| restore_mask | never, always, if_same_size | never | Mask restoration across image changes |
| block | never, if_empty_mask, if_empty_editor, always | never | Execution blocking mode |
| dazzle_signal | DAZZLE_SIGNAL | -- | Optional orchestration from Dazzle Command |
| inject_noise_mask | true, false | false | (Latent only) Write mask back to LATENT output |
This node extends the Preview Bridge concept from ComfyUI-Impact-Pack. We've contributed fixes to the original via PRs (#1172, #1009). Since Impact-Pack maintains a conservative approach, this standalone node enables rapid iteration on extended features.
- Architecture -- LayerCache system, mask combination, empty detection
- Dazzle Command Integration -- DAZZLE_SIGNAL protocol, cache-transparent orchestration
Enable verbose debug logging:
# Windows
set PBE_DEBUG=1 && python main.py
# Linux/Mac
PBE_DEBUG=1 python main.pyContributions welcome! Fork, create a feature branch, test in ComfyUI, and submit a PR.
Like the project?
Part of the DazzleNodes collection.
Inspired by:
- ComfyUI-Impact-Pack Preview Bridge node
- WAS Node Suite mask combination patterns
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

