Nunchaku FLUX LoRA Stacker with dynamic UI control and various tools
20
stars
324
commits
Python
primary language
Sep 7, 2026
updated
| EN | 中文 |
This repository provides thirteen custom nodes for ComfyUI:
On AMD / ROCm (and other setups where the official nunchaku package cannot import), Nunchaku FLUX–oriented features stay disabled so this pack can still load and the other nodes remain usable. Guarding nunchaku imports so a missing or failed nunchaku install does not take down the whole pack was the idea of the pull-request author 0xDELUXA (PR #6).
FLUX LoRA Loader V2 (FluxLoraMultiLoader_10) - Dynamic multi-LoRA loading with combo box UI for Nunchaku FLUX models
LoRA Stacker V2 (LoraStackerV2_10) - Universal LoRA loader for standard SD models (SDXL, Flux, WAN2.2, etc.) with dynamic 10-slot UI
LoRA Stacker V3 (LoraStackerV3_10) - Same as V2 for standard SD models, plus global toggle_all and per-slot enabled toggles for quick A/B and partial stacks
SDNQ LoRA Stacker V2 (SDNQLoraStackerV2_10) - Dedicated LoRA loader for SDNQ quantized models with dynamic 10-slot UI (designed for use with comfyui-sdnq-splited)
Model Patch Loader (ModelPatchLoaderCustom) - Load model patches (ControlNet, feature projectors, etc.) with CPU offload support and ConvRot INT8 support
Fast Groups Bypasser V2 (FastGroupsBypasserV2) - Group-based node control utility (ported from rgthree-comfy)
Universal LoRA Analyzer (UniversalLoRAAnalyzer) - Analyze LoRA files (model type, trigger words, base model, Civitai/HuggingFace URLs) without loading into the graph
Color Filter (ColorFilter) - Strip monochrome / black-and-white wording (supporting both built-in patterns and custom user-defined exclude words) from caption text produced by vision-language tagging (e.g. Florence-2, WD14 Tagger) before feeding prompts to downstream nodes
Florence-2 (four nodes: DownloadAndLoadFlorence2Model, DownloadAndLoadFlorence2Lora, Florence2ModelLoader, Florence2Run) — Load Florence-2–family vision-language checkpoints (Hugging Face download or local models/LLM), optional PEFT LoRA, then run captioning, OCR, DocVQA, grounding, segmentation, and prompt-generation tasks; outputs include FL2MODEL, PEFTLORA, annotated images, masks, and strings.
ControlAltAI (11 nodes) — my Python 3.13 fork, now under nodes/controlaltai/ (see ControlAltAI nodes below).
CCSR (TensorRT) (two nodes: LoadCCSRModelTensorRT, CCSR_Upscale_TRT) - TRT-engine acceleration of the CCSR ControlNet+UNet (engine-only load, aux VAE/cond_encoder weights, ~1.4x vs fp16 PyTorch). Prebuilt engine + aux weights + ConvRot INT8 model: https://huggingface.co/ussoewwin/CCSR-ConvRot-INT8-and-TensorRT-Engine (see CCSR nodes below).
Nunchaku Resolution Selector (NunchakuResolutionSelector) — Pick width/height from Flux1-style aspect presets (or custom size), emit hires dimensions, an empty 16-channel latent, and an info string (see Nunchaku Resolution Selector below).
lora_countComfyUI/custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/ussoewwin/ComfyUI-NunchakuFluxLoraStacker.git
pip install -r requirements.txt
The CCSR upscaler runs with NVIDIA TensorRT-RTX acceleration. You can install all dependencies and configure the TensorRT acceleration automatically using any of the following methods:
Method 1 (One-Click Batch File — Recommended for Windows):
Double-click Install TensorRT CCSR.bat in the repository root.
python_embeded\python.exe).requirements.txt and ensures the validated TensorRT-RTX runtime stack (tensorrt-rtx==1.6.1.120, latest triton-windows==3.8.0.post28, onnx==1.22.0, onnxscript==0.7.1, polygraphy==0.53.4) using --no-deps to preserve your ComfyUI PyTorch/CUDA environment.ccsr_apply_f16io.rtxplan and ccsr_trt_aux.safetensors) from Hugging Face into nodes/CCSR/trt_engines/.scripts/verify_install.py) and records logs to outputs/install.log.Method 2 (ComfyUI-Manager):
Installing or updating via ComfyUI-Manager automatically triggers install.py, which provisions the runtime stack and downloads missing engine files.
Method 3 (Manual Command Line):
python install.py
To verify your installation at any time:
python scripts/verify_install.py
model input.lora_count to the number of LoRA slots you want active.input_mode:
lora_wt_X for all-in-one strength control.model_str_X and clip_str_X for separate strength control.simple: Display LoRA name and a single strength slider.advanced: Display separate model and CLIP strength sliders.lora_count.input_mode.nunchaku) installed separately in the environmentV2 nodes were developed to support ComfyUI Nodes 2.0 (Desktop version). The new architecture required significant changes to widget management and input handling that are incompatible with V1.
V1 nodes (NunchakuFluxLoraStack) remain available for:
input_mode (simple/advanced) is still useful for some workflowsThis repository now includes multiple V2 nodes with enhanced functionality:
FluxLoraMultiLoader_10)model: Nunchaku FLUX base model (required)🔢 LoRA Count: Dropdown to select slot count (1-10)lora_name_X: LoRA filename (optional)lora_wt_X: LoRA strength, default 1.0 (optional)LoraStackerV3_10)Universal LoRA stacker for standard ComfyUI MODEL + CLIP pipelines (SDXL, Flux, WAN2.2, etc.). Same dynamic 1–10 slot UI as LoRA Stacker V2, with toggle controls for fast comparison and partial stacks.
toggle_all — when off, no LoRAs are applied (outputs pass through unchanged)enabled_1 … enabled_10 — when toggle_all is on, each slot can be enabled or disabled independentlyload_lora_for_models (model and CLIP strengths are tied to the same value)lora_strength_X range -100.0 to 100.0 (step 0.01)toggle_all | enabled_X | Slot X applied? |
|---|---|---|
| Off | (any) | No |
| On | Off | No |
| On | On | Yes (if a LoRA file is selected and strength ≠ 0) |
model, clip: Inputs from your base loader (required)toggle_all: Master enable for all LoRA slots (default: True)lora_count: Backend slot limit (synced by UI; hidden on the node face)enabled_X: Per-slot enable (optional, default True)lora_name_X: LoRA filename or None (optional)lora_strength_X: Strength for slot X (optional, default 1.0)ModelPatchLoaderCustom)CPU Offload Support: Optionally load model patches to CPU memory to save VRAM
Multiple Model Types: Supports QwenImage ControlNet, SigLIP feature projectors, and ZImage ControlNet
Automatic Detection: Automatically detects and loads the correct model type based on state dict keys
Flexible Deployment: Choose between CPU (memory) or GPU (VRAM) loading
ConvRot INT8 Support: ZImage ControlNet checkpoints quantized with comfy-native int8_tensorwise (ConvRot) are detected automatically via their comfy_quant metadata and loaded with mixed_precision_ops, keeping weights INT8 in memory while running through the comfy-kitchen int8_linear kernel (with online ConvRot activation rotation). Works with both GPU loading and CPU offload
How to quantize (Text Encoder / ControlNet): Hybrid-Sensitivity-Weighted-Quantization — How to quantize Text Encoder and ControlNet
.safetensors or .ckpt) in the model_patches foldercpu_offload to load to CPU memory (saves VRAM), or disable for GPU loadingMODEL_PATCH output to compatible nodesname: Model patch filename (required)cpu_offload: Load model to CPU memory instead of GPU (default: True)FastGroupsBypasserV2)Note: This node is a port from the original rgthree-comfy implementation and is unrelated to LoRA loading functionality. It is included here as a utility feature for workflow management.
Vision-language nodes built from the Florence-2 model stack bundled under nodes/florence2/. They appear under the ComfyUI category Florence2.
The Florence-2 implementation here started from kijai/ComfyUI-Florence2. A separate fork was maintained for Sage Attention 3 support and Transformers 5.x APIs; that fork is merged into this repository under nodes/florence2/ to reduce my own separate-repo maintenance.
load_model in nodes/florence2/nodes.py) is used when transformers >= 5.0, matching current PreTrainedModel / dtype APIs and Florence-2 processor behaviour. Use the requirements.txt line transformers>=4.39.0,!=4.50.* as the minimum pin; upgrading to 5.7 is supported for these nodes.sage_attention_2 and sage_attention_3 in addition to sdpa, eager, and flash_attention_2. When Transformers ≥ 5.0 is installed, the custom Florence-2 attention modules can replace SDPA layers for Sage modes (see nodes/florence2/modeling_florence2.py and nodes/florence2/docs/FIX_04_sage_attention_support.md). If Sage is selected but Transformers is older than 5.0, the node falls back to SDPA and logs a warning.DownloadAndLoadFlorence2Model saves weights under ComfyUI/models/LLM/<short_repo_name>/ (e.g. Florence-2-base for microsoft/Florence-2-base).Florence2ModelLoader lists subfolders already present under ComfyUI/models/LLM.| Node | Role |
|---|---|
| DownloadAndLoadFlorence2Model | Choose a preset Hugging Face repo, fp16 / bf16 / fp32, and attention backend; optional PEFTLORA input and optional .bin → .safetensors conversion. Returns florence2_model (FL2MODEL). |
| DownloadAndLoadFlorence2Lora | Downloads the fixed PixelProse LoRA repo for chaining into the loader. Returns lora (PEFTLORA). |
| Florence2ModelLoader | Same outputs as the HF downloader but model is a local directory name under models/LLM. |
| Florence2Run | Consumes IMAGE, FL2MODEL, text_input, and task (e.g. caption, detailed_caption, ocr, docvqa, region_proposal, …). Optional sampling controls, mask selection string, and seed. Returns image, mask, caption, data (JSON). |
Install Python deps from the repository root (includes Florence-2 and shared stack):
python -m pip install -r requirements.txt
Florence-2–specific packages include transformers, accelerate, peft, timm, matplotlib, and Pillow, in addition to nunchaku used elsewhere in this pack.
Utility nodes from the ControlAltAI family (category ControlAltAI utils in ComfyUI). They live under nodes/controlaltai/ in this pack.
These nodes trace to gseth/ControlAltAI-Nodes (MIT). My Python 3.13–compatible fork of those nodes is merged into this pack under nodes/controlaltai/ to reduce my own separate-repo maintenance (same node set).
Full node list, parameters, and screenshots: nodes/controlaltai/controlalttai.md.
Frontend helper for Integer Settings Advanced: js/integer_settings_advanced.js (served from the pack root js/ folder).
ColorFilter)Image captioning and tagging nodes (such as Florence-2 or WD14 Tagger) often emit phrases like “black and white” or “monochrome” when they describe the photo. Those tokens can leak into text-to-image prompts and bias the sampler toward grayscale output. Color Filter is a small text utility that removes those expressions from a string so downstream workflows see cleaner conditioning text.
STRING where you want monochrome-related wording stripped automatically.| Port | Type | Description |
|---|---|---|
text | STRING (multiline) | Raw caption or tag string from upstream analysis nodes. |
exclude_words | STRING (single-line) | Optional manual words/phrases to remove (separated by commas or newlines). Default is empty. |
filtered_text | STRING | Same text with built-in and user-defined words removed; consecutive whitespace is normalized to single spaces (newlines become spaces). |
black and white, monochrome, and grayscale; the full pattern set is defined in nodes/color_filter/color_filter.py.exclude_words are parsed dynamically (split by commas and newlines), escaped to prevent regex errors, and matched case-insensitively. They are prioritized and matched before the built-in hardcoded words.Image upscaling nodes leveraging the CCSR (Creative Content Super-Resolution) architecture, located under nodes/CCSR/. They appear under the ComfyUI category CCSR.
The CCSR code here originates from kijai/ComfyUI-CCSR, a ComfyUI wrapper around csslc/CCSR (Apache-2.0). The upstream pack targets the ComfyUI / Python versions of its time, so a separate fork was maintained to keep it working on the latest ComfyUI and Python 3.13 (import structure fixes, dependency updates). Maintaining a whole second repository just for that became wasteful, so the fork was merged into this repository under nodes/CCSR/.
After the merge the integration went further:
real-world_ccsr-fp16.safetensors) was added and validated, then the whole CCSR pipeline (tiled VAE encode/decode, ControlNet conditioning, UNet denoise) was verified end-to-end inside this pack.(1,2,1024)), converted to fp16 I/O, and built into a TensorRT-RTX engine (ccsr_apply_f16io.rtxplan). The engine runs the whole conditional denoise on the GPU without leaving the graph between ControlNet and UNet (~1.4x vs fp16 PyTorch).ccsr_trt_aux.safetensors) so the TRT loader needs no full checkpoint.LoadCCSRModelTensorRT, CCSR_Upscale_TRT).TensorRT execution path (engine-only, no full checkpoint required). The ControlNet+UNet denoise runs on a TensorRT engine; VAE + cond_encoder run on PyTorch fp16 via aux weights loaded beside the engine.
Model / engine download (Hugging Face):
| File | Put it in |
|---|---|
ccsr_apply_f16io.rtxplan | nodes/CCSR/trt_engines/ |
ccsr_trt_aux.safetensors | nodes/CCSR/trt_engines/ |
Automated setup: Running
install.py(or double-clickingInstall TensorRT CCSR.bat) automatically installs the validated TensorRT-RTX stack (tensorrt-rtx==1.6.1.120, latesttriton-windows==3.8.0.post28,onnx==1.22.0,onnxscript==0.7.1,polygraphy==0.53.4) and downloads missing engine files (ccsr_apply_f16io.rtxplan,ccsr_trt_aux.safetensors).
steps is the effective diffusion step count: the t_max/t_min band design is preserved while the schedule is densified so the truncated range contains exactly steps timesteps.
| Node | Role |
|---|---|
| LoadCCSRModelTensorRT | Engine-only loader. Selects a TRT engine from nodes/CCSR/trt_engines/*.rtxplan; ControlNet+UNet run on TensorRT (~1.4x vs fp16 PyTorch). Aux weights are auto-loaded from the same folder. Returns ccsr_model (CCSRMODEL). |
| CCSR_Upscale_TRT | TRT-accelerated upscale (fixed tile 512 / latent 64x64 to match the static engine shape). Returns upscaled_image (IMAGE). |
NunchakuResolutionSelector)Resolution helper that outputs pixel sizes and an empty 16-channel latent. Implementation: nodes/resolution_selector.py. Menu category: ussoewwin/resolution.
Choose a canvas size from a Flux1-oriented preset list (same aspect-ratio vocabulary as the ControlAltAI Megapixel Calculator under nodes/controlaltai/), or enter a custom width/height. The node outputs integer sizes, optional hires sizes via hires_scale, an empty 16-channel latent (batch × 16 × H/8 × W/8), and a short info string for debugging.
| Widget | Type | Description |
|---|---|---|
mode | Preset / Custom | Preset uses the dropdown; Custom uses custom_width / custom_height. |
preset | combo | Flux1 aspect patterns at 1.0 MP (divisible by 64), plus High variants at 1.5 MP (e.g. 1:1, 2:3, 3:4, 4:5, 9:16, 16:9, ultrawide ratios, …). |
custom_width / custom_height | INT (step 8) | Used when mode is Custom, or as fallback if a preset string cannot be parsed. |
hires_scale | FLOAT (default 1.3) | Multiplier for hires_width / hires_height (rounded and snapped to multiples of 8). |
batch_size | INT | Batch dimension of the empty latent. |
| Port | Type | Description |
|---|---|---|
width / height | INT | Selected pixel size. |
hires_width / hires_height | INT | Size after hires_scale (min 16, multiple of 8). |
latent | LATENT | Empty samples tensor with 16 channels. |
info | STRING | Human-readable summary (mode, source, sizes, scale, batch). |
WxH (e.g. 4:5 (Artistic Frame) (896x1088)); dimensions are parsed from that substring.height // 8 × width // 8.intermediate_device / intermediate_dtype.See Changelog for the full release history.
nodes/florence2/ (see Upstream and integration above)nodes/CCSR/ (see Upstream and integration above)nodes/florence2/ is derived from kijai/ComfyUI-Florence2 and is licensed under the MIT License; see nodes/florence2/LICENSE for the full text and copyright notice for that subtree.nodes/controlaltai/ — MIT License (see ControlAltAI nodes)nodes/CCSR/ is derived from kijai/ComfyUI-CCSR (which is based on the original csslc/CCSR Apache-2.0 implementation).Python
92.1%
JavaScript
7.6%
Nunchaku FLUX LoRA Stacker with dynamic UI control and various tools
20
stars
324
commits
Python
primary language
Sep 7, 2026
updated
| EN | 中文 |
This repository provides thirteen custom nodes for ComfyUI:
On AMD / ROCm (and other setups where the official nunchaku package cannot import), Nunchaku FLUX–oriented features stay disabled so this pack can still load and the other nodes remain usable. Guarding nunchaku imports so a missing or failed nunchaku install does not take down the whole pack was the idea of the pull-request author 0xDELUXA (PR #6).
FLUX LoRA Loader V2 (FluxLoraMultiLoader_10) - Dynamic multi-LoRA loading with combo box UI for Nunchaku FLUX models
LoRA Stacker V2 (LoraStackerV2_10) - Universal LoRA loader for standard SD models (SDXL, Flux, WAN2.2, etc.) with dynamic 10-slot UI
LoRA Stacker V3 (LoraStackerV3_10) - Same as V2 for standard SD models, plus global toggle_all and per-slot enabled toggles for quick A/B and partial stacks
SDNQ LoRA Stacker V2 (SDNQLoraStackerV2_10) - Dedicated LoRA loader for SDNQ quantized models with dynamic 10-slot UI (designed for use with comfyui-sdnq-splited)
Model Patch Loader (ModelPatchLoaderCustom) - Load model patches (ControlNet, feature projectors, etc.) with CPU offload support and ConvRot INT8 support
Fast Groups Bypasser V2 (FastGroupsBypasserV2) - Group-based node control utility (ported from rgthree-comfy)
Universal LoRA Analyzer (UniversalLoRAAnalyzer) - Analyze LoRA files (model type, trigger words, base model, Civitai/HuggingFace URLs) without loading into the graph
Color Filter (ColorFilter) - Strip monochrome / black-and-white wording (supporting both built-in patterns and custom user-defined exclude words) from caption text produced by vision-language tagging (e.g. Florence-2, WD14 Tagger) before feeding prompts to downstream nodes
Florence-2 (four nodes: DownloadAndLoadFlorence2Model, DownloadAndLoadFlorence2Lora, Florence2ModelLoader, Florence2Run) — Load Florence-2–family vision-language checkpoints (Hugging Face download or local models/LLM), optional PEFT LoRA, then run captioning, OCR, DocVQA, grounding, segmentation, and prompt-generation tasks; outputs include FL2MODEL, PEFTLORA, annotated images, masks, and strings.
ControlAltAI (11 nodes) — my Python 3.13 fork, now under nodes/controlaltai/ (see ControlAltAI nodes below).
CCSR (TensorRT) (two nodes: LoadCCSRModelTensorRT, CCSR_Upscale_TRT) - TRT-engine acceleration of the CCSR ControlNet+UNet (engine-only load, aux VAE/cond_encoder weights, ~1.4x vs fp16 PyTorch). Prebuilt engine + aux weights + ConvRot INT8 model: https://huggingface.co/ussoewwin/CCSR-ConvRot-INT8-and-TensorRT-Engine (see CCSR nodes below).
Nunchaku Resolution Selector (NunchakuResolutionSelector) — Pick width/height from Flux1-style aspect presets (or custom size), emit hires dimensions, an empty 16-channel latent, and an info string (see Nunchaku Resolution Selector below).
lora_countComfyUI/custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/ussoewwin/ComfyUI-NunchakuFluxLoraStacker.git
pip install -r requirements.txt
The CCSR upscaler runs with NVIDIA TensorRT-RTX acceleration. You can install all dependencies and configure the TensorRT acceleration automatically using any of the following methods:
Method 1 (One-Click Batch File — Recommended for Windows):
Double-click Install TensorRT CCSR.bat in the repository root.
python_embeded\python.exe).requirements.txt and ensures the validated TensorRT-RTX runtime stack (tensorrt-rtx==1.6.1.120, latest triton-windows==3.8.0.post28, onnx==1.22.0, onnxscript==0.7.1, polygraphy==0.53.4) using --no-deps to preserve your ComfyUI PyTorch/CUDA environment.ccsr_apply_f16io.rtxplan and ccsr_trt_aux.safetensors) from Hugging Face into nodes/CCSR/trt_engines/.scripts/verify_install.py) and records logs to outputs/install.log.Method 2 (ComfyUI-Manager):
Installing or updating via ComfyUI-Manager automatically triggers install.py, which provisions the runtime stack and downloads missing engine files.
Method 3 (Manual Command Line):
python install.py
To verify your installation at any time:
python scripts/verify_install.py
model input.lora_count to the number of LoRA slots you want active.input_mode:
lora_wt_X for all-in-one strength control.model_str_X and clip_str_X for separate strength control.simple: Display LoRA name and a single strength slider.advanced: Display separate model and CLIP strength sliders.lora_count.input_mode.nunchaku) installed separately in the environmentV2 nodes were developed to support ComfyUI Nodes 2.0 (Desktop version). The new architecture required significant changes to widget management and input handling that are incompatible with V1.
V1 nodes (NunchakuFluxLoraStack) remain available for:
input_mode (simple/advanced) is still useful for some workflowsThis repository now includes multiple V2 nodes with enhanced functionality:
FluxLoraMultiLoader_10)model: Nunchaku FLUX base model (required)🔢 LoRA Count: Dropdown to select slot count (1-10)lora_name_X: LoRA filename (optional)lora_wt_X: LoRA strength, default 1.0 (optional)LoraStackerV3_10)Universal LoRA stacker for standard ComfyUI MODEL + CLIP pipelines (SDXL, Flux, WAN2.2, etc.). Same dynamic 1–10 slot UI as LoRA Stacker V2, with toggle controls for fast comparison and partial stacks.
toggle_all — when off, no LoRAs are applied (outputs pass through unchanged)enabled_1 … enabled_10 — when toggle_all is on, each slot can be enabled or disabled independentlyload_lora_for_models (model and CLIP strengths are tied to the same value)lora_strength_X range -100.0 to 100.0 (step 0.01)toggle_all | enabled_X | Slot X applied? |
|---|---|---|
| Off | (any) | No |
| On | Off | No |
| On | On | Yes (if a LoRA file is selected and strength ≠ 0) |
model, clip: Inputs from your base loader (required)toggle_all: Master enable for all LoRA slots (default: True)lora_count: Backend slot limit (synced by UI; hidden on the node face)enabled_X: Per-slot enable (optional, default True)lora_name_X: LoRA filename or None (optional)lora_strength_X: Strength for slot X (optional, default 1.0)ModelPatchLoaderCustom)CPU Offload Support: Optionally load model patches to CPU memory to save VRAM
Multiple Model Types: Supports QwenImage ControlNet, SigLIP feature projectors, and ZImage ControlNet
Automatic Detection: Automatically detects and loads the correct model type based on state dict keys
Flexible Deployment: Choose between CPU (memory) or GPU (VRAM) loading
ConvRot INT8 Support: ZImage ControlNet checkpoints quantized with comfy-native int8_tensorwise (ConvRot) are detected automatically via their comfy_quant metadata and loaded with mixed_precision_ops, keeping weights INT8 in memory while running through the comfy-kitchen int8_linear kernel (with online ConvRot activation rotation). Works with both GPU loading and CPU offload
How to quantize (Text Encoder / ControlNet): Hybrid-Sensitivity-Weighted-Quantization — How to quantize Text Encoder and ControlNet
.safetensors or .ckpt) in the model_patches foldercpu_offload to load to CPU memory (saves VRAM), or disable for GPU loadingMODEL_PATCH output to compatible nodesname: Model patch filename (required)cpu_offload: Load model to CPU memory instead of GPU (default: True)FastGroupsBypasserV2)Note: This node is a port from the original rgthree-comfy implementation and is unrelated to LoRA loading functionality. It is included here as a utility feature for workflow management.
Vision-language nodes built from the Florence-2 model stack bundled under nodes/florence2/. They appear under the ComfyUI category Florence2.
The Florence-2 implementation here started from kijai/ComfyUI-Florence2. A separate fork was maintained for Sage Attention 3 support and Transformers 5.x APIs; that fork is merged into this repository under nodes/florence2/ to reduce my own separate-repo maintenance.
load_model in nodes/florence2/nodes.py) is used when transformers >= 5.0, matching current PreTrainedModel / dtype APIs and Florence-2 processor behaviour. Use the requirements.txt line transformers>=4.39.0,!=4.50.* as the minimum pin; upgrading to 5.7 is supported for these nodes.sage_attention_2 and sage_attention_3 in addition to sdpa, eager, and flash_attention_2. When Transformers ≥ 5.0 is installed, the custom Florence-2 attention modules can replace SDPA layers for Sage modes (see nodes/florence2/modeling_florence2.py and nodes/florence2/docs/FIX_04_sage_attention_support.md). If Sage is selected but Transformers is older than 5.0, the node falls back to SDPA and logs a warning.DownloadAndLoadFlorence2Model saves weights under ComfyUI/models/LLM/<short_repo_name>/ (e.g. Florence-2-base for microsoft/Florence-2-base).Florence2ModelLoader lists subfolders already present under ComfyUI/models/LLM.| Node | Role |
|---|---|
| DownloadAndLoadFlorence2Model | Choose a preset Hugging Face repo, fp16 / bf16 / fp32, and attention backend; optional PEFTLORA input and optional .bin → .safetensors conversion. Returns florence2_model (FL2MODEL). |
| DownloadAndLoadFlorence2Lora | Downloads the fixed PixelProse LoRA repo for chaining into the loader. Returns lora (PEFTLORA). |
| Florence2ModelLoader | Same outputs as the HF downloader but model is a local directory name under models/LLM. |
| Florence2Run | Consumes IMAGE, FL2MODEL, text_input, and task (e.g. caption, detailed_caption, ocr, docvqa, region_proposal, …). Optional sampling controls, mask selection string, and seed. Returns image, mask, caption, data (JSON). |
Install Python deps from the repository root (includes Florence-2 and shared stack):
python -m pip install -r requirements.txt
Florence-2–specific packages include transformers, accelerate, peft, timm, matplotlib, and Pillow, in addition to nunchaku used elsewhere in this pack.
Utility nodes from the ControlAltAI family (category ControlAltAI utils in ComfyUI). They live under nodes/controlaltai/ in this pack.
These nodes trace to gseth/ControlAltAI-Nodes (MIT). My Python 3.13–compatible fork of those nodes is merged into this pack under nodes/controlaltai/ to reduce my own separate-repo maintenance (same node set).
Full node list, parameters, and screenshots: nodes/controlaltai/controlalttai.md.
Frontend helper for Integer Settings Advanced: js/integer_settings_advanced.js (served from the pack root js/ folder).
ColorFilter)Image captioning and tagging nodes (such as Florence-2 or WD14 Tagger) often emit phrases like “black and white” or “monochrome” when they describe the photo. Those tokens can leak into text-to-image prompts and bias the sampler toward grayscale output. Color Filter is a small text utility that removes those expressions from a string so downstream workflows see cleaner conditioning text.
STRING where you want monochrome-related wording stripped automatically.| Port | Type | Description |
|---|---|---|
text | STRING (multiline) | Raw caption or tag string from upstream analysis nodes. |
exclude_words | STRING (single-line) | Optional manual words/phrases to remove (separated by commas or newlines). Default is empty. |
filtered_text | STRING | Same text with built-in and user-defined words removed; consecutive whitespace is normalized to single spaces (newlines become spaces). |
black and white, monochrome, and grayscale; the full pattern set is defined in nodes/color_filter/color_filter.py.exclude_words are parsed dynamically (split by commas and newlines), escaped to prevent regex errors, and matched case-insensitively. They are prioritized and matched before the built-in hardcoded words.Image upscaling nodes leveraging the CCSR (Creative Content Super-Resolution) architecture, located under nodes/CCSR/. They appear under the ComfyUI category CCSR.
The CCSR code here originates from kijai/ComfyUI-CCSR, a ComfyUI wrapper around csslc/CCSR (Apache-2.0). The upstream pack targets the ComfyUI / Python versions of its time, so a separate fork was maintained to keep it working on the latest ComfyUI and Python 3.13 (import structure fixes, dependency updates). Maintaining a whole second repository just for that became wasteful, so the fork was merged into this repository under nodes/CCSR/.
After the merge the integration went further:
real-world_ccsr-fp16.safetensors) was added and validated, then the whole CCSR pipeline (tiled VAE encode/decode, ControlNet conditioning, UNet denoise) was verified end-to-end inside this pack.(1,2,1024)), converted to fp16 I/O, and built into a TensorRT-RTX engine (ccsr_apply_f16io.rtxplan). The engine runs the whole conditional denoise on the GPU without leaving the graph between ControlNet and UNet (~1.4x vs fp16 PyTorch).ccsr_trt_aux.safetensors) so the TRT loader needs no full checkpoint.LoadCCSRModelTensorRT, CCSR_Upscale_TRT).TensorRT execution path (engine-only, no full checkpoint required). The ControlNet+UNet denoise runs on a TensorRT engine; VAE + cond_encoder run on PyTorch fp16 via aux weights loaded beside the engine.
Model / engine download (Hugging Face):
| File | Put it in |
|---|---|
ccsr_apply_f16io.rtxplan | nodes/CCSR/trt_engines/ |
ccsr_trt_aux.safetensors | nodes/CCSR/trt_engines/ |
Automated setup: Running
install.py(or double-clickingInstall TensorRT CCSR.bat) automatically installs the validated TensorRT-RTX stack (tensorrt-rtx==1.6.1.120, latesttriton-windows==3.8.0.post28,onnx==1.22.0,onnxscript==0.7.1,polygraphy==0.53.4) and downloads missing engine files (ccsr_apply_f16io.rtxplan,ccsr_trt_aux.safetensors).
steps is the effective diffusion step count: the t_max/t_min band design is preserved while the schedule is densified so the truncated range contains exactly steps timesteps.
| Node | Role |
|---|---|
| LoadCCSRModelTensorRT | Engine-only loader. Selects a TRT engine from nodes/CCSR/trt_engines/*.rtxplan; ControlNet+UNet run on TensorRT (~1.4x vs fp16 PyTorch). Aux weights are auto-loaded from the same folder. Returns ccsr_model (CCSRMODEL). |
| CCSR_Upscale_TRT | TRT-accelerated upscale (fixed tile 512 / latent 64x64 to match the static engine shape). Returns upscaled_image (IMAGE). |
NunchakuResolutionSelector)Resolution helper that outputs pixel sizes and an empty 16-channel latent. Implementation: nodes/resolution_selector.py. Menu category: ussoewwin/resolution.
Choose a canvas size from a Flux1-oriented preset list (same aspect-ratio vocabulary as the ControlAltAI Megapixel Calculator under nodes/controlaltai/), or enter a custom width/height. The node outputs integer sizes, optional hires sizes via hires_scale, an empty 16-channel latent (batch × 16 × H/8 × W/8), and a short info string for debugging.
| Widget | Type | Description |
|---|---|---|
mode | Preset / Custom | Preset uses the dropdown; Custom uses custom_width / custom_height. |
preset | combo | Flux1 aspect patterns at 1.0 MP (divisible by 64), plus High variants at 1.5 MP (e.g. 1:1, 2:3, 3:4, 4:5, 9:16, 16:9, ultrawide ratios, …). |
custom_width / custom_height | INT (step 8) | Used when mode is Custom, or as fallback if a preset string cannot be parsed. |
hires_scale | FLOAT (default 1.3) | Multiplier for hires_width / hires_height (rounded and snapped to multiples of 8). |
batch_size | INT | Batch dimension of the empty latent. |
| Port | Type | Description |
|---|---|---|
width / height | INT | Selected pixel size. |
hires_width / hires_height | INT | Size after hires_scale (min 16, multiple of 8). |
latent | LATENT | Empty samples tensor with 16 channels. |
info | STRING | Human-readable summary (mode, source, sizes, scale, batch). |
WxH (e.g. 4:5 (Artistic Frame) (896x1088)); dimensions are parsed from that substring.height // 8 × width // 8.intermediate_device / intermediate_dtype.See Changelog for the full release history.
nodes/florence2/ (see Upstream and integration above)nodes/CCSR/ (see Upstream and integration above)nodes/florence2/ is derived from kijai/ComfyUI-Florence2 and is licensed under the MIT License; see nodes/florence2/LICENSE for the full text and copyright notice for that subtree.nodes/controlaltai/ — MIT License (see ControlAltAI nodes)nodes/CCSR/ is derived from kijai/ComfyUI-CCSR (which is based on the original csslc/CCSR Apache-2.0 implementation).Python
92.1%
JavaScript
7.6%