Custom nodes for ComfyUI by PiePieDesign
A preview node that gives you control over when images get saved.
The Problem It Solves:
- Combines behavior of Preview Image and Save Image core nodes
- Allows for ad-hoc saving to follow the Save Image prefix formats
- Key use case: you have a lot of runs with mixed quality results. You only want to save the good ones and not the bad ones. -> Use "Manual Save" mode
- Key use case: you want to save all the runs just like the Save Image node. -> Use "Always Save" mode
How It Works:
Two modes to choose from:
-
Always save mode - Works exactly like Save Image
- Every generation automatically saves to your output folder
-
Manual save mode - Only saves when you click the button
- Generates and shows preview
- Nothing gets saved until you click "💾 Manual Save"
- Bad generations? Just re-generate
- Good generation? Click save and it goes to your output folder with the same prefix you would have had with the Save Image node
Quick way to pick optimal resolutions for different model types.
The Problem It Solves:
- No more guessing which resolution works best for your model
- No more manually typing in width/height values
- Extensable with the js/resolutions.js file
How It Works:
- Choose your model type (Flux, SDXL, SD1.5, Pony, etc.)
- Choose orientation (Portrait, Landscape, Square)
- Pick from the filtered list of optimal resolutions
- Or select CUSTOM and enter whatever dimensions you want
The dropdown dynamically updates based on your selections, showing only relevant resolutions.
Find the closest suggested resolution to your target megapixel count.
The Problem It Solves:
- You know you want "around 1.5 megapixels" but don't want to calculate dimensions
- Key use case: you're iterating fast and want consistent megapixel counts without manually picking resolutions
- Optional use case: you want to stay under a certain megapixel limit for VRAM reasons
How It Works:
- Set your target megapixels (e.g., 1.5)
- Choose model type and orientation filters (or leave as ALL)
- Toggle "do not exceed" if you want to enforce a hard limit
- Node outputs the closest matching width, height, and actual megapixels
Simple text concatenation with a separator.
The Problem It Solves:
- Joining multiple text inputs without messy workarounds
- Key use case: combining prompts, filenames, or tags from different sources
How It Works:
Takes multiple text inputs and joins them with your chosen separator (space, comma, newline, etc.). Allows for manual entry or inputs.
Image restoration and enhancement using the LucidFlux model with Flux diffusion.
Notes:
- Dimension workaround - dimensions are automatically adjusted to SwinIR requirements. There might be a better way of handling that but this avoids a lot of issues.
- Use embeddings or conditioning - precomputed prompt embeddings or live CLIP conditioning. I suggest using the embeddings and ensure "use_embeddings" is TRUE. IF using CLIP then set that to false.
- Accelerator - FLUX Turbo is in example workflow, optional. Use 4-8 steps instead if using.
- Prepreocess - OPTIONAL - Suggest using HYPIR (see workflow example with preprocessing) as preprocessor for most general use cases. This requires ComfyUI-HYPIR custom node download.
The node handles model caching, memory management, and optional model offloading for VRAM efficiency.
Required Models and Download Links:
| Model | Location | Download Link | Notes |
|---|---|---|---|
| LucidFlux Checkpoint | ComfyUI/models/LucidFlux/ |
lucidflux.pth (3.39 GB) | Main restoration model |
| SwinIR Prior | ComfyUI/models/LucidFlux/ |
Download from LucidFlux repo | Use tools.download_weights script |
| Prompt Embeddings (Optional) | ComfyUI/models/LucidFlux/ |
prompt_embeddings.pt (8.39 MB) | Pre-computed embeddings |
| Flux Model (Recommended) | ComfyUI/models/unet/ |
flux1-dev-fp8.safetensors (17.2 GB) | FP8 quantized for lower VRAM usage. Alternative: Kijai/flux-fp8 |
| VAE | ComfyUI/models/vae/ |
ae.safetensors | Flux VAE |
| CLIP Vision (Recommended) | ComfyUI/models/clip_vision/ |
siglip2-so400m-patch16-512 | Google SigLIP 2 model (4.55 GB) |
- Open ComfyUI
- Click the "Manager" button
- Click "Install Custom Nodes"
- Search for "PiePieTweaks"
- Click Install
- Restart ComfyUI
Clone this repository into ComfyUI/custom_nodes
Found a bug? Have a feature idea? Open an issue!
Pull requests welcome. Please keep it simple and well-commented.
MIT License
Made by PiePieDesign