Nuke Nodes for ComfyUI
Bringing professional VFX compositing workflows to AI generation by implementing Foundry Nuke's industry-standard nodes in ComfyUI.
Overview
ComfyUI has revolutionized AI image generation workflows, but it lacks the professional compositing tools that VFX artists use daily in software like Foundry Nuke. This project bridges that gap by implementing a comprehensive collection of Nuke's most essential nodes directly in ComfyUI.
With over 26 merge operations and nodes for color grading, transformations, and blur effects, this package enables professional compositing techniques within AI generation pipelines, allowing artists to seamlessly integrate AI-generated content into production workflows.
The Challenge
VFX artists working with AI generation face a fundamental workflow disconnect:
- ComfyUI excels at AI generation but lacks professional compositing operations
- Nuke has industry-standard compositing tools but no native AI generation
- Artists must export, composite externally, then re-importβbreaking the creative flow
- Advanced operations like stencils, mattes, and color burn are unavailable
The solution: bring Nuke's professional compositing nodes directly into ComfyUI, creating a unified environment for AI generation and VFX compositing.
Implemented Node Categories
Merge Nodes (26+ Operations)
Complete implementation of Nuke's merge operations, from standard compositing modes to advanced mathematical blends.
- βStandard compositing: over, under, plus, minus
- βPhotographic blends: multiply, screen, overlay, soft light, hard light
- βColor adjustments: color dodge, color burn, darken, lighten
- βMathematical operations: difference, exclusion, average, divide
- βChannel operations: in, out, atop, xor, mask, stencil, matte
- βMix slider for blend amount control
Grade Nodes
Professional color correction and grading tools matching Nuke's workflow.
- βLift, gamma, gain controls for precise color grading
- βMultiply and offset adjustments
- βIndividual RGB channel control
- βBlack and white point adjustments
- βSaturation and contrast controls
Transform Nodes
Spatial transformation operations for positioning and manipulating images.
- βTranslation (X, Y positioning)
- βRotation with center point control
- βScale (uniform and non-uniform)
- βSkew transformations
- βCenter point adjustments
- βMultiple interpolation methods
Blur Nodes
Professional blur and softening operations.
- βGaussian blur with quality control
- βDirectional blur for motion effects
- βAdjustable blur size and intensity
- βEdge handling options
Viewer & Utility Nodes
Essential tools for inspecting and managing composites.
- βImage viewer with metadata display
- βAlpha channel visualization
- βCheckerboard background for transparency
- βImage information display
Complete Merge Operations Reference
Technical Implementation
Architecture
The project is structured as a modular Python package with separate files for each node category, ensuring maintainability and extensibility.
Project Structure
Key Design Decisions
Pixel-Perfect Accuracy
Each merge operation is implemented to match Nuke's exact mathematical formulation, ensuring identical results.
Alpha Channel Handling
Proper premultiplied alpha handling throughout, critical for professional compositing.
Performance Optimization
Efficient NumPy operations and optional OpenCV acceleration for real-time feedback.
Extensible Architecture
Clean, modular design makes it easy to add new nodes or customize existing ones.
Code Example: Merge Node Implementation
class NukeMerge:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"image_a": ("IMAGE",),
"image_b": ("IMAGE",),
"operation": (MERGE_OPERATIONS,),
"mix": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0}),
}
}
def merge(self, image_a, image_b, operation, mix):
# Convert to float32 for precision
a = image_a.cpu().numpy().astype(np.float32)
b = image_b.cpu().numpy().astype(np.float32)
# Apply merge operation
if operation == "over":
result = a + b * (1 - a[..., 3:4])
elif operation == "multiply":
result = a * b
elif operation == "screen":
result = 1 - (1 - a) * (1 - b)
# ... (26 total operations)
# Apply mix
result = b + (result - b) * mix
return (torch.from_numpy(result),)Installation & Usage
Installation
git clone https://github.com/sumitchatterjee13/nuke-nodes-comfyui
Typical Workflow
Professional Applications
AI-Enhanced Matte Painting
Generate multiple AI layers and composite them using professional techniquesβscreen for glows, multiply for shadows, color dodge for light effects.
VFX Plate Preparation
Prepare AI-generated elements for integration into Nuke workflows, using identical merge operations for predictable results.
Concept Art Development
Rapidly iterate on concepts by generating and compositing multiple variations, using stencils and mattes for complex selections.
Look Development
Experiment with color grades and blending modes directly in the generation pipeline, matching established VFX color workflows.
Impact & Community
Project Highlights
- βOpen source MIT licensed, encouraging community contribution and adoption
- βFirst comprehensive implementation of Nuke compositing in ComfyUI
- βBridges the gap between AI generation and professional VFX workflows
- βActive development with community feedback and feature requests
- βComprehensive documentation and examples for ease of use
Why This Matters
By bringing Nuke's industry-standard compositing operations to ComfyUI, this project enables VFX professionals to integrate AI generation seamlessly into their existing workflows. Artists can now perform complex compositing tasks without leaving ComfyUI, maintaining creative momentum while leveraging familiar, battle-tested compositing techniques used in feature films worldwide.
Future Development
- βAdditional Nuke Nodes:ColorCorrect, Keyer, Despill, and other essential nodes
- βAdvanced Masking:Roto shapes and bezier curve support for precise selections
- β3D Integration:Camera projection and 3D compositing operations
- βPerformance Optimization:GPU acceleration for real-time previews of complex composites
- βPreset System:Save and load node configurations for quick setup
Technology Stack
Conclusion
Nuke Nodes for ComfyUI represents a significant step forward in making AI generation accessible to VFX professionals. By implementing industry-standard compositing operations in a pixel-perfect manner, this project eliminates the need to switch between tools, enabling artists to create complex, production-ready composites entirely within ComfyUI. As the bridge between cutting-edge AI and traditional VFX continues to strengthen, tools like this become essential for modern content creation pipelines.
Open Source Project by Sumit Chatterjee
MIT Licensed β’ Community Contributions Welcome