MCPcopy Index your code
hub / github.com/erosDiffusion/ComfyUI-enricos-nodes

github.com/erosDiffusion/ComfyUI-enricos-nodes @v4.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.0.1 ↗ · + Follow
2,020 symbols 5,933 edges 19 files 1,020 documented · 50%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Create complex compositions the FAST and EASY way (V4 Alpha is out!)

the compositor node

How many times do you need want to create something like this ? the compositor node

Well, This node was created to make the composition process quick and easy!

The Compositor Node

With the Compositor Node you can:

  • Create quick compositions: Pass up to 8 images and visually place, rotate, scale, and flip them
  • Manage Layers: Drag-to-reorder layers, toggle visibility, preview images and masks side-by-side
  • Quickly set a background color: Easily choose the background color or keep transparent!
  • Draw: Sketch and annotate easily with Paint/erase on foreground layer with adjustable brush (size, color, shape)
  • Erase while drawing: simply ctrl+draw to erase while in draw mode
  • Transform: Flip H/V, stretch to fit, align selected objects, rotate with precision
  • Perform smart selections: Precise pixel-level selection mode, snap-to-grid for alignment
  • Do numerical transforms: Numerical width/height boxes for exact dimensions
  • Auto-Save your edits: Automatic upload when composition changes
  • Create stable assets: well defined outputs and temporary images.
  • Reset your canvas: you lost your image outside of screeen: Reset All button to restore initial configuration, select and move via layers.

  • Reload with no fear: Remember positions, scaling, rotations, z-index across generations and reloads

  • Save on resources: Choose where to save inputs so they will persist reloads
  • Park your assets: Extra padding area to park assets or reach transform handles
  • Visualize your composition: Clear green border indicating the exact exported region
  • Preview Masks: See masks in your layers
  • Precisely move with keyboard: Arrow keys for precise 1px nudging (Shift for 10px)
  • Handle multiple object easily: Multi-select and transform multiple layers together
  • Export more than images: Export final image, and other information

Changelog

  • v 4.0.0 Alpha - 16.11.2025 new gui with tools, reload and remember, refactored code.

Compositor V4 Interface

  • major rewrite: Complete UI overhaul with enhanced workflow!
  • new feature: Layers Panel - Visual layer management with thumbnails for images and masks, drag-to-reorder, visibility toggles
  • new feature: Drawing Tools - Foreground layer with brush/eraser modes, color picker, adjustable brush size and shape (circle/square)
  • new feature: Enhanced Toolbar - Comprehensive transformation controls (flip H/V, stretch, align), snap-to-grid, precise selection mode
  • new feature: Numerical Inputs - Direct width/height control with real-time feedback, rotation slider with snap (Shift for 5° increments)
  • new feature: Save & Reset - Auto-save on mouse-out with visual feedback (orange flash), Reset All button to restore initial state
  • enhancement: Mask Preview - Side-by-side image and mask thumbnails with opacity indicators
  • enhancement: Improved Alignment - Composition border now pixel-perfect with export area
  • technicalities: Input options with the new configuration you can choose the quality of the input (saved to disk) and position: the tmp folder is temporary and will not on reload persist reloads. save to output in by default in a well isolated folder with unique names

  • _Attention!!!: This is an Alpha preview, v3 still there. :

Compositor V4 Output Example

Known Issues / Work in Progress:

  • Erase canvas might restore erased foreground in certain cases
  • Positions are not always pixel-perfect (sub-pixel rounding)
  • Some transformation tools can be unreliable (equalize/distribute disabled)
  • Temporary remmoved mask output and advanced outputs.
  • Can be very heavy depending on the size of canvas and imported images, keep it reasonable in size. avoid importing 8 4k images in a 4k canvas...

Previous versions changelog

click here to expand the changelog...

  • v 3.1.5 - 04.05.2025
  • new feature: Mask outputs! you asked for it so there you go: A new node that outputs the layers and their masks! search for the compositor masks output node and connect it to the new layer_outputs output socket. note: mask stacking (subtract top masks from the bekow ones will come later)
  • new node :a new color picker node (specify rgb coordinates or use the eyedropper and connect the 24 bit output to connect to color inputs).
  • bugfix: fixed a regression for which the composition overlay was not being superimposed the composition while moving objects and z-stacking not being preserved until save
  • sample workflow: a sample workflow with assets can be found in the /assets/workflows folder
  • v 3.1.3 & 3.1.4 - fix regression due to comfy change, not sure what else is brooken but ... reinstance the node. might be that reloading a flow does not preserve anymore the configurations
  • v 3.1.2 - merge pr for comfyui official registry
  • v 3.1.1 - 23.03.2025 fixed gui not showing up in comfy frontend higher Comfy 1.1.18+
  • v 3.1.0 - 20.09.2024

  • new configuration feature: onConfigChange action toggle when you change the configuration (or any of the attached nodes) you can now choose if:

    • you want to stop the flow to allow edits
    • or you want to grab a capture and continue the flow
      $${\color{red}Important}$$! this option stops, uploads the composition and re-enqueues your prompt (there is no real pause) so careful with random seeds on the left of the node or it will loop!
  • new configuration feature: normalize height when this is activated your images will all be the same height of the canvas (this can lower image quality)

  • transforms enhancement: output transforms now give you back the angle and bounding box coordinates
  • transforms enhancement: you can force transform outputput values to be integers (as some nodes requires it)

  • new feature: (experimental and limited): Tools ! this is an experimental feature. it allows controlling some aspects of the compositor.

    • precise selection toggle ignore transparent pixels and select the first image below the mouse
    • center selected puts the selected images in the center of canvas
    • reset transforms zeroes out the changes to images bringing them to their original size, angle and 0,0 location (top left)
    • limitations: as saving discards the selection, and it happens on mouse out
      you might need to re-select to use centering and reset

the compositor node - v 3.0.8 - 18.09.2024 - new feature: invert mask option. the implementation of mask was not correct. now it's possible to invert the mask via toggle. - new feature: angle output the angle of rotation is now accessible in the output (and soon the bounding box x,y, width and height). - bugfix: fix cut images on swap due to wrongly preserved width and height - _new feature: added force int to allow the outputs to be used with set area conditioning (that requires int) - v 3.0.4 - 18.09.2024 - bugfix: the width and height stored in transforms were swapped and the output node would report them incorrectly. thanks @sky958958 for spotting it - v 3.0.2 - 17.09.2024 - friendly transforms for area prompting!
With the goal of being able to do regional area prompting,
now you can easily output each input x,y coordinates and their scaled width and height with the help of the new Transform Output node! select the channel corresponding the input and the node will output the values for you. - enhancement: a new node outputs x,y,width,height other images into a convenient node to be attached to the transforms output - enhancement: save and restore skew from transform (now you can distort your images to help fake perspective) - v 3.0.0 - 16.09.2024 - this release is a full rewrite of the code and fixes: - issues #45 , #34, #18 also, and adds new features: - enhancement: simplified control panel (cature on queue, save transform, pause are removed as not needed anymore) - new feature: automatic upload of the output on mouse out of the canvas area (no need to click capture) - new feature: flash on save (once the image is uploaded the composition area green border briefly flashes in orange) - new feature: preliminary work for optional control panels (they will contain alignment controls, and other tools) - enhancement: enqueue with continue, on the first run, if necessary information is missing (like output) the flow will stop, make your composition, and click continue to re-enqueue the flash finishes. - v 2.0.4 - 06.09.2024 - enhancement: You can now scale the selected image via mouse wheel! - v 2.0.1 - 05.09.2024 - V2 is HERE! - enhancement: An all new widget layout with maximized working area and less clutter - new feature: A new companion configuration widget to allow more control and easier maintenance - enhancement: More control! it's now possible to select an image or group and then "alt+drag" to center scale and rotate - new feature: More control! it's now possible to nudge a selection by one pixel by using keyboard arrows, and while holding shift the movement is 10px! pixel perfect alignments! - new feature: the node now remembers the transforms you have applied, on the new run it will re-apply the stored transforms (storing transforms is controlled in the config) - new feature: masks are here! you can now pass masks, and they will be applied automatically! (depending on the results you might want still to invert them) - regression: a bit annoying but is_changed is not being observed so flows are re-triggered even on fixed - regression: img in workflow saved is not visible anymore - V 1.0.9 - 30.08.2024 - Huge refactoring! - new feature: multiple instances are now possible - bugfix: zooming out does not hide the compositor images anymore - bugfix: when saving a png with the workflow the compositor content is now visible (will not be restored...yet) - enhancement: the node does not re-trigger the execution of the flow if the image is not changed - performance: the node is now more efficient and correctly implements the is_changed check via checksum, avoiding re-triggering flows downstream if the composition has not changed - maintainability: the node is now refactored and better engineered, with a lot of comments. could be a good use case for those learning to code comfy extensions. - V 1.0.8 - 28.08.2024 - new feature: safe area indication - a green border is overlaid on top of the composition to indicate the exported area - V 1.0.7 - 28.08.2024 - new feature: preserve stacking order. when selecting a node, it's z-order is preserved image1 being the background/farthest and image8 the foreground/closest. - the first connected node will be the most distant from camera (background) - the last will be the closest to camera (subject/foreground) - V 1.0.4 - 27.08.2024 - new feature: now it's possible to pause the flow with a switch to avoid processing an unfinished composition

Setup

Method 1: git clone open the custom nodes directory in your editor and

git clone https://github.com/erosDiffusion/ComfyUI-enricos-nodes.git

like all other custom nodes (that are not integrated with manager)

Method 2: ComfyUi Manager In Comfy UI Manager search "Compositor" and select the node from erosDiffusion and press install.

Method 3: via manager's button open ComfyUI manager click on Install via Git URL and paste this url

https://github.com/erosDiffusion/ComfyUI-enricos-nodes.git

if you get: "This action is not allowed with this security level configuration" then check your manager config.ini as discussed here: and set the security to weak (at your risk)

the compositor node

Reasons and How To use

Why this node ?

  • I wanted to learn how to create custom nodes with a GUI in ComfyUI
  • be able to composite visually images in ComfyUI
  • be able to have image inputs that are generated on the fly in the composition
  • be able to remember sizing and position across usages/generations
  • have more room to manipulate objects around/outside the generated image
  • fast forward to 2025, almost 2026 now we have edit models and other goodies still... with qwen image edit and fuse lora, quick mockups are still useful
  • use as canvas for other editing tools to "direct" your scene... annotate and reframe, quickly setup a moodboard for edit models or drive animations...
  • make nice collages

Alternatives ?

  • the painter node is great and works better and does a million things more, but it misses some of these features.
  • continue compositing your image like caveman using pixel coordinates
  • well...photoshop ** if you have it** and import via million clicks or with a plugin
  • finally use Krita which is good powerful and free
  • oh and Blender also has a great plugin but you need to know/learn blender
  • invokeai
  • plethora of tools available in 2025 but this one is in comfy and it will get better soon :D

How to use

Quick Start (V4):

  1. Search "Compositor" (V4) and "Compositor Config" (V4) in the node menu
  2. Connect Config node to Compositor's config input
  3. Configure: width, height, padding (extra space around canvas for easier manipulation)
  4. Connect up to 8 images and op

Core symbols most depended-on inside this repo

Shape

Method 1,259
Function 556
Class 203
Route 2

Languages

TypeScript96%
Python4%

Modules by API surface

web/fabricNew.js1,659 symbols
web/compositor4.js122 symbols
web/compositor3.js75 symbols
web/fabric.js52 symbols
CompositorConfig4.py19 symbols
CompositorConfig3.py14 symbols
web/imageSampler.js13 symbols
Compositor4.py10 symbols
Compositor3.py10 symbols
web/tools.js9 symbols
ImageColorSampler.py9 symbols
CompositorColorPicker.py6 symbols

For agents

$ claude mcp add ComfyUI-enricos-nodes \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page