⭐ Give a star, it shines and keeps us motivated! ✨
ComfyUI-Lightx02-Nodes
Description: Custom nodes for ComfyUI by Light-x02. Optimize and simplify workflows, adding utilities, samplers, schedulers and various tools (Flux, images, etc.) to enrich and extend ComfyUI’s capabilities.
This repository brings together several custom nodes developed to make ComfyUI more powerful and modular.
🌐 Links & Support
- ☕ Ko-fi → https://ko-fi.com/light_x02
- 🖼️ Civitai → https://civitai.com/user/Light_x02
- 📷 Facebook → https://www.facebook.com/Unrealeterna
🧩 Installation
Method 1: Install via ComfyUI Manager
- Go to the Custom Nodes section in the interface.
- Search for "ComfyUI-Lightx02-Nodes" and install it directly from the ComfyUI Manager.
- Restart ComfyUI
Restart ComfyUI to load the node.
Method 2: Clone the Repository
- Open a terminal or command prompt.
- Run the following command to clone the repository:
git clone https://github.com/Light-x02/ComfyUI-Lightx02-Nodes.git - Restart ComfyUI
Once the files are in place, restart ComfyUI to load the node.
Compatibility
Compatible with the extension ComfyUI-ImageMetadataExtension. This integration ensures metadata compatibility with Civitai, allowing details such as sampler, steps, guidance, prompt, and seed to be correctly captured and displayed on the Civitai platform.
🧩 Custom Nodes
⚙️ Flux/SDXL Settings Pipe & 📤 Settings Pipe Unpack
ComfyUI — ⚙️ Flux/SDXL Settings Pipe & 📤 Settings Pipe Unpack
These two nodes are designed to simplify Flux and SDXL workflows: a single node to configure resolution and sampling parameters, and a second node to unpack fields from the pipe.
⚙️ Flux/SDXL Settings Pipe
Description
Central node that prepares settings for Flux or SDXL. It offers two lists of model-specific resolutions (Flux vs SDXL) and a switch (mode_resolution) to toggle between them. It computes and outputs a pipe (structured object) containing everything needed for proper sampling, along with individual outputs (latent, width/height, sampler, sigmas, etc.).
Main Features
- Flux/SDXL switchable mode (
mode_resolution) with resolutions adapted to each model family. - Preset resolutions + overrides (
width_override,height_override) and flip orientation (swap W/H) for faster setup. - Sampler & Scheduler: select from ComfyUI’s official samplers and schedulers.
- Steps & Denoise: fine control over iteration count and denoising strength.
- Guidance & CFG: manage guidance (written into conditioning) and expose a dedicated CFG.
- Seed & Noise: generates a reusable custom noise generator and exposes the seed.
- Colored Section Headers: section titles in the node are clickable; you can change their background color.
- Colors are saved locally in your web browser (via localStorage).
- Each header keeps its chosen color between ComfyUI sessions.
- Pipe Output: returns a full FLUX_PIPE, ideal for keeping workflows clean and modular.
Example Usage
- Place ⚙️ Flux/SDXL Settings Pipe and select Flux or SDXL using
mode_resolution. - Choose
sampler_name,scheduler,steps,denoise. Adjustguidanceorcfgas needed. - Click on the colored section headers to adjust their background color if desired (saved in your browser).
- Connect the
pipeoutput to 📤 Settings Pipe Unpack (to access clean individual outputs).
📤 Settings Pipe Unpack
Description
Unpacks a FLUX_PIPE to retrieve all useful outputs without cluttering the workflow. The first PIPE output allows you to extend the chain from the same object if needed (best practice to keep the graph clean and modular).
Why Use It?
- Centralize: a single cable from the main node to the unpack → fewer wires everywhere.
- Extendable: keeps
pipeas the first output to chain other compatible nodes. - Readable: results in cleaner, more maintainable workflows.
Presets — Management and Best Practices
These nodes include a preset system (UI button Manage presets) that lets you save/load the state of the ⚙️ Flux/SDXL Settings Pipe node.
What Gets Saved
- The main widget values of the node (resolution, Flux/SDXL mode, steps, denoise, sampler, scheduler, guidance, cfg, etc.).
- Purely UI elements (colored headers, management button) are not saved.
Available Operations
- Apply to node: apply the selected preset to the current node.
- Save (overwrite): overwrite the selected preset with the node’s current values.
- Save As…: create a new preset.
- Rename…: rename a preset.
- Delete: remove a preset.
- Export / Import: exchange presets via JSON files.
Where Are Presets Stored?
- One JSON file per preset in the extension’s
presets/subfolder.
Compatibility
- Compatible with Flux and SDXL (resolution lists designed for each model family).
- The pipe is designed to remain stable and extendable, preventing cable clutter.
Example Workflow
⚙️ Node Presets Universal
Node Presets Universal
Description
Node Presets Universal is a ComfyUI extension that allows you to save, load, rename, delete, export, and import presets for any node directly via the right-click context menu.
Unlike node-specific preset systems, this extension is universal: it works on almost all nodes without requiring code modifications.
⚠️ Limitation: Some nodes that rely heavily on JavaScript for dynamic UI (e.g., Power Lora Loader) may not be fully compatible.
Features
Context Menu Integration
- Adds a "Presets" submenu to all nodes in ComfyUI.
- Accessed by right-clicking a node → Presets.
Preset Management
- Save Preset…: Save the current widget values of the node as a preset.
- Load Preset…: Load a previously saved preset into the node.
- Delete Preset…: Permanently delete a saved preset.
- Manage…: Open a dedicated management dialog with advanced options.
Manage Dialog
A lightweight UI that lets you:
- Apply to node: Load the selected preset onto the node.
- Save (overwrite): Overwrite the current preset with the node’s values.
- Save As…: Save the current configuration under a new preset name.
- Rename…: Rename a preset without losing its values.
- Delete: Remove the selected preset.
- Export (selected): Export one preset to JSON.
- Export (all): Export all presets of a node type to JSON.
- Import: Import presets from JSON files.
Storage System
- One file per node type: presets are stored per node type in a
.jsonfile. - Location: stored under
ComfyUI\User\default\preset_nodes. - Presets are saved differently depending on ComfyUI’s storage mode:
- Server mode → stored via API.
- Local mode → stored in browser localStorage.
Current Preset Tracking
- The currently applied preset name is stored per node ID in localStorage.
- This is cosmetic: it helps you remember which preset was last used.
Example Workflow
- Right-click on any node → Presets → Save preset….
- Give it a name (e.g., High Quality Sampling).
- Later, right-click the node → Presets → Load preset… → High Quality Sampling.
- Use Manage… for advanced actions like renaming, exporting, or batch importing presets.
Limitations
- Some JavaScript-based nodes with dynamic UIs (e.g. Power Lora Loader) may not correctly serialize/restore all widget values.
- Only widgets with standard serializable values (combo, int, float, text, checkbox, etc.) are supported. Buttons, separators, and UI-only widgets are ignored.
📝 ComfyUI Image Metadata Nodes
ComfyUI Image Metadata Nodes
Version: 1.1.0
Description
Two complementary nodes for ComfyUI to load and save images while preserving metadata. Ideal for workflows like upscaling without altering original metadata.
How It Works
- Image Metadata Loader imports an image and extracts its metadata. Optional
MASKoutput. - Image Metadata Saver saves an image with original, unchanged metadata embedded in the PNG.
Connect the loader’s METADATA output to the saver’s METADATA input to preserve metadata across transformations.
Features
- Supported formats: PNG (metadata embedded).
- Optional Mask Output from the loader.
- Dynamic metadata management for complex workflows.
- Advanced compatibility: metadata correctly embedded in the final PNG file.
- Dynamic pathing with date/time placeholders.
Supported Prefixes
| Placeholder | Description | Scope |
|---|---|---|
%date:yyyy% |
Year (e.g. 2025) | ✅ Filename / Subdir |
%date:yy% |
Year short (e.g. 25) | ✅ Filename / Subdir |
%date:MM% |
Month (01–12) | ✅ Filename / Subdir |
%date:dd% |
Day (01–31) | ✅ Filename / Subdir |
%date:yyyy-MM% |
Year-Month | ✅ Filename / Subdir |
%date:yyyy-MM-dd% |
Full Date | ✅ Filename / Subdir |
%time:HH% |
Hour (24h) | ✅ Filename / Subdir |
%time:mm% |
Minute | ✅ Filename / Subdir |
%time:ss% |
Second | ✅ Filename / Subdir |
%time:HH-mm-ss% |
Full Time | ✅ Filename / Subdir |
%datetime:full% |
Full datetime | ✅ Filename only ⚠️ |
⚠️
%datetime:full%is not allowed insubdirectory_name.
Usage
Image Metadata Loader
- Outputs:
IMAGE: The loaded image.METADATA: The raw metadata.MASK: Optional mask output.
Image Metadata Saver
- Inputs:
IMAGE: The image to save.METADATA: The metadata to include (optional).
- Options:
- Filename Prefix (e.g.,
%date:yyyy-MM-dd%). - Subdirectory Name (can be dynamically generated).
- Filename Prefix (e.g.,
Example Workflow
- Load image & metadata with Image Metadata Loader.
- Process image (e.g., upscale).
- Connect
METADATA(loader) →METADATA(saver). - Save with Image Metadata Saver.
Additional Notes
For txt2img metadata in PNG, I use ComfyUI-ImageMetadataExtension:
https://github.com/edelvarden/ComfyUI-ImageMetadataExtension
Contribution
Issues/PRs welcome:
https://github.com/Light-x02/ComfyUI-Image-Metadata-Nodes
✂️ Crop Image
Crop Image
CropImage is a ComfyUI node to crop an image (and optionally its mask) using pixel values.
Features
- Crop from all 4 sides:
crop_top,crop_bottom,crop_left,crop_right - Values are given directly in pixels
- Supports images and masks
- Optional rotation with automatic white fill (255 for masks)
- No automatic resizing → output keeps the exact cropped size
Parameters
- crop_top: pixels to crop from the top
- crop_bottom: pixels to crop from the bottom
- crop_left: pixels to crop from the left
- crop_right: pixels to crop from the right
- rotation: rotation angle in degrees (clockwise), with expansion and white fill
Returns
- image: the cropped (and rotated) image
- mask: the cropped mask (if provided)
Example usage
Crop an image of 2600×1104 to keep only the area x=1352, y=136, width=1248, height=832:
crop_left = 1352crop_right = 0crop_top = 136crop_bottom = 136
Output will be 1248×832.
✦ Category: lightx02
✦ Display name in ComfyUI: Crop Image
⚠️ Notes — Avoid Duplicate Installations
If you already installed the standalone versions of these nodes from my other repositories, please uninstall those standalones to prevent duplicate registration and conflicts:
- ✂️ Crop Image — standalone repo: https://github.com/Light-x02/ComfyUI_Crop_Image_By_Lightx02
- 📝 ComfyUI Image Metadata Nodes — standalone repo: https://github.com/Light-x02/ComfyUI-Image-Metadata-Nodes
How to remove duplicates
- Go to your
ComfyUI/custom_nodes/folder. - Delete the folders for the standalone versions listed above (if present).
- Restart ComfyUI.
Symptoms of duplicates: nodes appearing twice, “node already registered” errors, or import failures when starting ComfyUI.
📄 License
Unless otherwise stated in the repository, this project is released under the MIT License.



