ComfyUI Extension: PortraitUtils
A focused node collection designed for pipelines using real photographic images where resolutions are not standardized like they are in text-to-image generation.
Custom Nodes (0)
README
PortraitUtils Node Suite
PortraitUtils is a focused collection of ComfyUI nodes designed for pipelines using real potographic images of people, where image sizes are not standardized as they are in text-to-image generation. The suite streamlines prep work such as cropping, resolution targeting, metadata management, and side-by-side QA so you can concentrate on creative iteration instead of utility wiring. These nodes should work well on any type of image, but some of them are designed for and tested on images of humans, particularly the smart cropping nodes.
Node Index
Each entry links to a short, task-oriented reference page (coming soon) for deeper usage notes and parameter breakdowns.
Image Adjustments & Preparation
AutoAdjustNode
– One-click levels, tone, and color balancing. DocsAutoWBColorMatch
– White-balances and colour matches against a reference image using several algorithms. DocsAutoColorConfigNode
– Lightweight toggle bundle for sharing Auto Adjust presets. DocsFluxResolutionPrepare
– Crops and resizes to the nearest Flux-friendly resolution, with optional pre-upscale. DocsImageMegapixelSelector
– Chooses image sizes by target megapixels to match downstream model limits. Docs
Cropping, Framing, and Stitching
AutoCropBorders
– Removes uniform borders using adaptive fuzzy detection. GPU acceleration is currently broken, so leave that off for now. DocsCropImageByMargins
– Manual margin-based cropper for RGB images. DocsCropMaskByMargins
– Margin cropper designed for MASK tensors. DocsFitAspectHeadSafe
– Rescales and pads while preserving face-safe regions for portrait framing. DocsMQBBoxMin
– Utility for merging bounding boxes while enforcing minimum sizes. DocsStitchByMask
– Composites foreground and background images using mask-driven blending. Docs
Prompting & Workflow Configuration
MultiPromptNode
– Cycles through prompt variants with per-slot weights. DocsWorkflowConfig
– Centralized key/value store for workflow-wide settings. DocsOutpaintConfigNode
– Packs outpainting preferences (steps, padding, sampler choices). DocsOutpaintPaddingComputeNode
– Calculates padding offsets to feed outpaint chains as either percentage or absolute pixels, with gravity. Docs
I/O & Utility Helpers
LoadImageCombined
– Hybrid single/batch image loader with auto-advance support. DocsPortraitUtils_PairedImageLoader
– Loads synchronized source/output pairs for A/B comparison workflows. DocsFilenameAppendSuffix
– Adds suffixes to filenames while respecting multi-extension cases. DocsGpuSyncCacheClear
– Forces a CUDA sync and empties selected caches to avoid VRAM buildup. DocsSeedVR2Prep
– Convenience helper for SeedVR2/VRAM-heavy pipelines (cache priming & cleanup). Docs
License
This project is released under the MIT License.