Skip to content Have a ComfyUI workflow? Get a readable Workflow Doc in your browser.Make a workflow readable.Try it now ↗ ComfyUI_Swwan | ST StudioNode packVerifiedExternal
ComfyUI_Swwan
抽取常用 ComfyUI 节点
抽取常用 ComfyUI 节点
Maintainer@aining2022Cgrade
Package profile
- Status
- Verified
- Publisher
- @aining2022
- Source
- GitHub
- Stars
- 33
ComfyUI_Swwan
ComfyUI 自定义节点集合,收录个人常用节点,包含图像处理、Mask操作、数学运算、批处理等功能。
节点列表
图像处理 (Image)
Related resources
9 connections
Source context: Repo aining2022/ComfyUI_Swwan
| Resize Image v2 (KJ Alternative) | 多功能图像缩放,支持裁剪/填充/拉伸,以及可选 NVIDIA RTX VSR |
| Image Resize By Megapixels | 按目标百万像素缩放,支持宽高比控制与可选 NVIDIA RTX VSR |
| Image Concatenate | 图像拼接(横向/纵向) |
| Image Concat From Batch | 从批次中拼接图像 |
| Image Grid Composite 2x2/3x3 | 2x2/3x3 网格合成 |
| Color Match | 颜色匹配 |
| Color Shift Fix | 视频 inpaint 色差修复:以遮罩外区域为参考逐帧拟合每通道仿射变换,参数时序平滑防闪烁 |
| Save Image With Alpha | 保存带透明通道的图像 |
| Cross Fade Images | 图像交叉淡入淡出 |
| Add Label | 添加文字标签 |
| Image Pad KJ | 图像填充 |
| Draw Mask On Image | 在图像上绘制 Mask |
| RGBA Safe Pre / Post / Save / Multi Save | 透明图安全前后处理与多格式保存 |
图像裁剪 (Crop)
| 节点名 | 说明 |
|---|
| CropByMask V2/V3 | 基于 Mask 智能裁剪 |
| RestoreCropBox | 还原裁剪区域到原图 |
| Image Crop By Mask | 按 Mask 裁剪图像 |
| Image Crop By Mask And Resize | 裁剪并缩放 |
| Image Uncrop By Mask | 还原裁剪 |
批处理 (Batch)
| 节点名 | 说明 |
|---|
| Get Image Range From Batch | 从批次获取指定范围图像 |
| Get Images From Batch Indexed | 按索引获取图像 |
| Insert Images To Batch Indexed | 按索引插入图像 |
| Replace Images In Batch | 替换批次中的图像 |
| Shuffle Image Batch | 打乱图像顺序 |
| Reverse Image Batch | 反转图像顺序 |
| Image Batch Multi | 多图像批次合并 |
| Image List To Batch / Batch To List | 列表与批次互转 |
比例缩放 (Scale)
| 节点名 | 说明 |
|---|
| ImageScaleByAspectRatio V2 | 按宽高比缩放 |
| Image Resize sum | 综合缩放节点 |
| Load And Resize Image | 加载并缩放图像 |
Mask 处理
| 节点名 | 说明 |
|---|
| Mask transform sum | Mask 变换 |
数学运算 (Math)
| 节点名 | 说明 |
|---|
| Math Expression | 数学表达式计算 |
| Math Calculate | 数学计算 |
| Math Remap Data | 数值映射 |
开关与控制 (Switch)
| 节点名 | 说明 |
|---|
| Any Switch | 任意类型切换 |
| Any Boolean Switch | 布尔切换 |
工具 (Utility)
| 节点名 | 说明 |
|---|
| Seed | 种子节点(支持随机/递增) |
| IO Save Image Format | 轻量格式保存节点,保留质量/压缩/优化等关键参数,适合 Replicate 快速导出 |
| Patch Sage Attention KJ (KJ Alternative) | 独立的 SageAttention 模型补丁节点 |
| MiniMax H3 Mem Eff Sage Attention Patch (KJ Alternative) | MiniMax H3 的低显存 SageAttention 模型补丁节点 |
| Get Image Size & Count | 获取图像尺寸和数量 |
| Get Latent Size & Count | 获取 Latent 尺寸和数量 |
| Preview Animation | 动画预览 |
| Fast Preview | 快速预览 |
IO Save Image Format
这个节点从格式保存场景里裁掉了不必要的元数据和工作流导出逻辑,只保留会明显影响编码耗时和文件体积的参数:
quality
png_compress_level
optimize
webp_lossless
webp_method
如果你的目标是在 Replicate 上缩短节点尾部保存耗时,优先建议:
- PNG 建议从
png_compress_level = 1 起步,在保存耗时和文件体积之间做平衡
- WebP 关闭
webp_lossless,并优先使用较低的 webp_method,默认值已调整为 2
- JPEG/TIFF 默认可保持
optimize = true;如果你更在意极限保存速度,也可以手动关闭
file_format = jpg
quality = 88
png_compress_level = 1
optimize = true
webp_method = 2
另外,如果某些 Pillow 编码器在 optimize = true 时保存失败,节点会自动回退到不使用 optimize 再重试,避免在批处理或 Replicate 任务里直接中断。
KJ Alternative SageAttention
Patch Sage Attention KJ (KJ Alternative) 用于给 MODEL 打上 SageAttention attention override;它使用独立节点类型,因此可与 KJNodes 同时安装。
- 节点本身已内置到
ComfyUI_Swwan
- 运行时仍需要额外安装
sageattention 或 sageattn3
- 选择
disabled 时会移除当前模型上的 optimized_attention_override
MiniMax H3 Mem Eff Sage Attention Patch (KJ Alternative) 会直接替换 MiniMax H3 transformer block 的 attention forward,以降低峰值显存。它需要匹配的 ComfyUI MiniMax H3 API、最新版 sageattention、Triton、CUDA 和受支持 NVIDIA GPU 架构。
NVIDIA RTX Video Super Resolution
Resize Image v2 (KJ Alternative) 与 Image Resize By Megapixels 都提供 nvidia_rtx_vsr 插值方式。该方式按需加载 nvvfx / nvidia-vfx,仅适用于兼容的 CUDA NVIDIA GPU;输出尺寸会自动对齐到最接近的 8 倍数。
RGBA 节点详解
这组节点用于让带透明通道的图片安全地通过任意 RGB-only IMAGE 流程,并在最后按需要输出为透明 PNG / WebP 或普通 JPEG / PNG / WebP。
解决的问题
- PNG 透明边缘白边、黑边、发灰边
- 中间模型不支持 RGBA,只接受 RGB
IMAGE
- 处理后 alpha 丢失
unpremultiply 时因为 alpha 太小出现除 0 或爆亮
- 同一条工作流需要同时兼容透明输出和普通 RGB 输出
推荐工作流
Load Image
↓
RGBA Safe Pre
↓
Any IMAGE Node
↓
RGBA Multi Save (png/webp, alpha_mode=auto 或 keep)
需要把修正后的 RGB 和 alpha 继续传给后续节点:
Load Image
↓
RGBA Safe Pre
↓
Nodes in this pack
100 nodes
AddLabel
AddLabel
"
Swwan/Text · 2 inputs · 9 parameters · 1 output
AnyBooleanSwitch (Swwan)
AnyBooleanSwitch (Swwan)
Compact description unavailable for this node.
Swwan/Utils · 1 input · 1 parameter · 1 output
AnySwitch (Swwan)
AnySwitch (Swwan)
Compact description unavailable for this node.
Swwan/Utils · 2 inputs · 0 parameters · 2 outputs
BatchSlice
BatchSlice
Compact description unavailable for this node.
Apt Preset/Data/😺Backup · 1 input · 2 parameters · 1 output
BoundedImageCrop
BoundedImageCrop
Crops images using IMAGE_BOUNDS data.
Support batch processing with one-to-one or one-to-many bounds-to-images mapping.
Swwan/Image · 2 inputs · 0 parameters · 1 output
BoundedImageCropWithMask
BoundedImageCropWithMask
Crops images based on mask bounds with customizable padding.
Returns both cropped images and the calculated IMAGE_BOUNDS.
Swwan/Image · 2 inputs · 5 parameters · 2 outputs
ColorMatch
ColorMatch
"
Swwan/Image · 2 inputs · 3 parameters · 1 output
CrossFadeImages
CrossFadeImages
Compact description unavailable for this node.
Swwan/Image · 1 output
CrossFadeImagesMulti
CrossFadeImagesMulti
Compact description unavailable for this node.
Swwan/Image · 1 output
DrawMaskOnImage
DrawMaskOnImage
Applies the provided masks to the input images.
Swwan/Masking · 2 inputs · 3 parameters · 1 output
FastPreview
FastPreview
Experimental node for faster image previews by displaying through base64 it without saving to disk.
Swwan/Experimental · 1 input · 2 parameters · 0 outputs
GetImageRangeFromBatch
GetImageRangeFromBatch
"
Swwan/Image · 2 outputs
GetImagesFromBatchIndexed
GetImagesFromBatchIndexed
"
Swwan/Image · 1 output
GetImageSizeAndCount
GetImageSizeAndCount
"
Swwan/Image · 1 input · 0 parameters · 4 outputs
GetLatentRangeFromBatch
GetLatentRangeFromBatch
"
KJNodes/Latents · 1 output
GetLatentSizeAndCount
GetLatentSizeAndCount
"
Swwan/Image · 1 input · 0 parameters · 6 outputs
Image_Resize_sum
Image_Resize_sum
"
Apt Preset/Image · 4 inputs · 8 parameters · 4 outputs
Image_Resize_sum_data
Image_Resize_sum_data
"
Apt Preset/Image/😺Backup · 2 inputs · 0 parameters · 11 outputs
Image_Resize_sum_restore
Image_Resize_sum_restore
"
Apt Preset/Image · 2 inputs · 2 parameters · 3 outputs
ImageAddMulti
ImageAddMulti
"
Swwan/Image · 1 output
ImageAndMaskPreview
ImageAndMaskPreview
"
KJNodes/Masking · 2 inputs · 3 parameters · 1 output
ImageBatchExtendWithOverlap
ImageBatchExtendWithOverlap
"
Swwan/Image · 3 outputs
ImageBatchFilter
ImageBatchFilter
Removes empty images from a batch
Swwan/Image · 2 outputs
ImageBatchJoinWithTransition
ImageBatchJoinWithTransition
"
Swwan/Image · 2 inputs · 7 parameters · 1 output
ImageBatchMulti
ImageBatchMulti
"
Swwan/Image · 1 output
ImageBatchRepeatInterleaving
ImageBatchRepeatInterleaving
"
Swwan/Image · 2 inputs · 1 parameter · 2 outputs
ImageBatchTestPattern
ImageBatchTestPattern
Compact description unavailable for this node.
Swwan/Text · 0 inputs · 8 parameters · 1 output
ImageBlendSwwan
ImageBlendSwwan
Compact description unavailable for this node.
Swwan/Image · 1 output
ImageConcanate
ImageConcanate
"
Swwan/Image · 2 inputs · 2 parameters · 1 output
ImageConcatFromBatch
ImageConcatFromBatch
"
Swwan/Image · 1 input · 3 parameters · 1 output
ImageConcatMulti
ImageConcatMulti
"
Swwan/Image · 1 output
ImageCropByMask
ImageCropByMask
Crops the input images based on the provided mask.
Swwan/Image · 2 inputs · 0 parameters · 1 output
ImageCropByMaskAndResize
ImageCropByMaskAndResize
Compact description unavailable for this node.
Swwan/Image · 2 inputs · 4 parameters · 3 outputs
ImageCropByMaskBatch
ImageCropByMaskBatch
Crops the input images based on the provided masks.
Swwan/Image · 2 inputs · 5 parameters · 2 outputs
ImageGrabPIL
ImageGrabPIL
"
Swwan/Image · 1 output
ImageGridComposite2x2
ImageGridComposite2x2
"
Swwan/Image · 4 inputs · 0 parameters · 1 output
ImageGridComposite3x3
ImageGridComposite3x3
"
Swwan/Image · 9 inputs · 0 parameters · 1 output
ImageGridtoBatch
ImageGridtoBatch
Converts a grid of images to a batch of images.
Swwan/Image · 1 input · 2 parameters · 1 output
ImageNormalize_Neg1_To_1
ImageNormalize_Neg1_To_1
"
Swwan/Image · 1 input · 0 parameters · 1 output
ImagePadForOutpaintMasked
ImagePadForOutpaintMasked
Compact description unavailable for this node.
Image · 2 inputs · 5 parameters · 2 outputs
ImagePadForOutpaintTargetSize
ImagePadForOutpaintTargetSize
Compact description unavailable for this node.
Image · 2 outputs
ImagePadKJ
ImagePadKJ
Pad the input image and optionally mask with the specified padding.
Swwan/Image · 4 inputs · 7 parameters · 2 outputs
ImagePass
ImagePass
"
Swwan/Image · 1 input · 0 parameters · 1 output
ImagePrepForICLora
ImagePrepForICLora
Compact description unavailable for this node.
Image · 4 inputs · 3 parameters · 2 outputs
ImageResizeByMegapixels
ImageResizeByMegapixels
"
Swwan/Image · 5 outputs
ImageResizeKJ
ImageResizeKJ
"
Swwan/Image · 3 outputs
ImageResizeKJv2Alternative
ImageResizeKJv2Alternative
Compact description unavailable for this node.
ImageTensorList
ImageTensorList
"
Swwan/Image · 2 inputs · 0 parameters · 1 output
ImageUncropByMask
ImageUncropByMask
Compact description unavailable for this node.
Swwan/Image · 4 inputs · 1 parameter · 1 output
ImageUpscaleWithModelBatched
ImageUpscaleWithModelBatched
"
Swwan/Image · 2 inputs · 1 parameter · 1 output
InsertImagesToBatchIndexed
InsertImagesToBatchIndexed
"
Swwan/Image · 2 inputs · 2 parameters · 1 output
InsertLatentToIndex
InsertLatentToIndex
"
KJNodes/Latents · 1 output
IO_save_image
IO_save_image
Compact description unavailable for this node.
Swwan/IO · 1 input · 6 parameters · 1 output
IO_save_image_format
IO_save_image_format
"
Swwan/IO · 1 input · 10 parameters · 1 output
LayerUtility: ColorImage (Swwan)
LayerUtility: ColorImage (Swwan)
Create a solid RGB image tensor without depending on ComfyUI_LayerStyle.
😺DzNodes/LayerUtility · 0 inputs · 3 parameters · 1 output
LayerUtility: CropByMask V2
LayerUtility: CropByMask V2
基于遮罩区域智能裁剪图像,支持高级检测算法。 功能特点: - 三种检测模式:maskarea(遮罩区域)、minboundingrect(最小边界矩形)、maxinscribedrect(最大内接矩形) - 可自定义边距保留(上、下、左、右) - 将尺寸调整为指定倍数(8、16、32、64、128、256、512) - 可选的手动裁剪框输入 - 返回裁剪后的图像、遮罩、裁剪框坐标和预览图 使用场景: - 提取遮罩区域进行集中处理 - 为修复工作流准备图像 - 优化处理区域以减少计算量
RunningHub/LayerUtility · 4 outputs
LayerUtility: CropByMask V3
LayerUtility: CropByMask V3
Compact description unavailable for this node.
RunningHub/LayerUtility · 4 outputs
LayerUtility: CropByMask V4
LayerUtility: CropByMask V4
CropByMask V4 - 增强版智能裁剪节点
相比 V3 新增功能:
- reuse_crop_box: 复用首次计算的 crop_box,适合视频批量处理
- device: 支持 CPU/GPU 选择
RunningHub/LayerUtility · 4 outputs
LayerUtility: ImageScaleByAspectRatio V2
LayerUtility: ImageScaleByAspectRatio V2
将图像缩放到特定宽高比,支持多种适配模式。 功能特点: - 预设宽高比:1:1、3:2、4:3、16:9、21:9、3:4、9:16 等 - 支持自定义宽高比 - 三种缩放模式:letterbox(信箱)、crop(裁剪)、fill(填充) - 缩放到特定边(最长边、最短边、宽度、高度) - 将尺寸调整为指定倍数 - SSAA(超采样抗锯齿)支持 使用场景: - 为特定输出格式准备图像 - 在处理过程中保持宽高比 - 为批量处理创建一致的图像尺寸
RunningHub/LayerUtility · 5 outputs
LayerUtility: RestoreCropBox
LayerUtility: RestoreCropBox
将裁剪后的图像恢复到原始画布位置。 功能特点: - 将裁剪图像粘贴回原始坐标 - 支持基于遮罩的合成 - 自动处理 alpha 通道 - 支持批量处理 - 遮罩反转选项 使用场景: - 将处理后的区域恢复到原始图像 - 完成 裁剪 → 处理 → 恢复 工作流 - 无缝图像合成
RunningHub/LayerUtility · 3 inputs · 1 parameter · 2 outputs
LayerUtility: RestoreCropBox V2
LayerUtility: RestoreCropBox V2
RestoreCropBox V2 - 增强版裁剪还原节点
相比 V1 新增功能:
- feathering: 边缘羽化,解决粘贴时的色差/硬边问题
- device: 支持 CPU/GPU 选择
RunningHub/LayerUtility · 4 inputs · 3 parameters · 2 outputs
list_Merge
list_Merge
Compact description unavailable for this node.
Apt Preset/Data/😺Backup · 0 inputs · 0 parameters · 1 output
list_num_range
list_num_range
Compact description unavailable for this node.
Apt Preset/Data/😺Backup · 0 inputs · 3 parameters · 3 outputs
list_Slice
list_Slice
Compact description unavailable for this node.
Apt Preset/Data/😺Backup · 1 input · 2 parameters · 1 output
list_Value
list_Value
Compact description unavailable for this node.
Apt Preset/Data · 0 inputs · 2 parameters · 3 outputs
LoadAndResizeImage
LoadAndResizeImage
Compact description unavailable for this node.
Swwan/Image · 5 outputs
LoadImagesFromFolderKJ
LoadImagesFromFolderKJ
""Loads images from a folder into a batch, images are resized and loaded into a batch.""
Swwan/Image · 0 inputs · 7 parameters · 4 outputs
LoadVideosFromFolder
LoadVideosFromFolder
Compact description unavailable for this node.
Swwan/Misc · 0 inputs · 10 parameters · 1 output
Mask_transform_sum
Mask_transform_sum
Compact description unavailable for this node.
Apt Preset/Mask · 2 inputs · 15 parameters · 2 outputs
math_calculate
math_calculate
"
Apt Preset/Data · 3 inputs · 2 parameters · 3 outputs
math_Remap_data
math_Remap_data
Compact description unavailable for this node.
Apt Preset/Data · 2 inputs · 5 parameters · 2 outputs
MathExpression_UTK
MathExpression_UTK
Compact description unavailable for this node.
Swwan/Math · 2 outputs
MergeBatch
MergeBatch
Compact description unavailable for this node.
Apt Preset/Data/😺Backup · 0 inputs · 0 parameters · 1 output
MergeImageChannels
MergeImageChannels
"
Swwan/Image · 4 inputs · 0 parameters · 1 output
MiniMaxH3MemoryEfficientSageAttentionPatchKJAlternative
MiniMaxH3MemoryEfficientSageAttentionPatchKJAlternative
Compact description unavailable for this node.
PadImageBatchInterleaved
PadImageBatchInterleaved
"
Swwan/Image · 1 input · 3 parameters · 2 outputs
PatchSageAttentionKJAlternative
PatchSageAttentionKJAlternative
Compact description unavailable for this node.
PreviewAnimation
PreviewAnimation
Compact description unavailable for this node.
Swwan/Image · 2 inputs · 1 parameter · 0 outputs
raiseExceptionOnTrue
raiseExceptionOnTrue
当输入为True时抛出自定义异常,用于终止工作流节省计算成本
Swwan/Utils · 0 inputs · 2 parameters · 1 output
RemapImageRange
RemapImageRange
"
Swwan/Image · 1 input · 3 parameters · 1 output
ReplaceImagesInBatch
ReplaceImagesInBatch
"
Swwan/Image · 2 outputs
ReverseImageBatch
ReverseImageBatch
"
Swwan/Image · 1 output
RGBA_Multi_Save
RGBA_Multi_Save
"
Swwan/RGBA · 2 inputs · 12 parameters · 0 outputs
RGBA_Safe_Post
RGBA_Safe_Post
"
Swwan/RGBA · 2 inputs · 2 parameters · 2 outputs
RGBA_Safe_Pre
RGBA_Safe_Pre
"
Swwan/RGBA · 2 inputs · 0 parameters · 3 outputs
RGBA_Save
RGBA_Save
"
Swwan/RGBA · 2 inputs · 1 parameter · 0 outputs
SaveImageKJ
SaveImageKJ
Saves the input images to your ComfyUI output directory.
Swwan/Image · 2 inputs · 3 parameters · 1 output
SaveImageWithAlpha
SaveImageWithAlpha
"
Swwan/Image · 2 inputs · 1 parameter · 0 outputs
SaveStringKJ
SaveStringKJ
Saves the input string to your ComfyUI output directory.
Swwan/Misc · 1 input · 3 parameters · 1 output
sch_image
sch_image
Compact description unavailable for this node.
Apt Preset/Data/Schedule · 1 output
sch_mask
sch_mask
Compact description unavailable for this node.
Apt Preset/Data/Schedule · 1 output
sch_Prompt
sch_Prompt
Compact description unavailable for this node.
Apt Preset/Data/Schedule · 1 input · 3 parameters · 1 output
sch_split_text
sch_split_text
"
Apt Preset/Data/Schedule · 0 inputs · 4 parameters · 2 outputs
sch_text
sch_text
Compact description unavailable for this node.
Apt Preset/Data/Schedule · 0 inputs · 3 parameters · 3 outputs
sch_Value
sch_Value
Compact description unavailable for this node.
Apt Preset/Data/Schedule · 0 inputs · 3 parameters · 4 outputs
Seed (rgthree)
Seed (rgthree)
增强的种子节点
Rgthree · 0 inputs · 1 parameter · 1 output
ShuffleImageBatch
ShuffleImageBatch
Compact description unavailable for this node.
Swwan/Image · 1 output
SplitImageChannels
SplitImageChannels
"
Swwan/Image · 1 input · 0 parameters · 4 outputs
SwwanColorShiftFix
SwwanColorShiftFix
Compact description unavailable for this node.
SwwanCropByMaskV5
SwwanCropByMaskV5
CropByMask V5 - 批处理增强版智能裁剪节点
相比 V4 新增功能:
- batch_mode: 批处理模式,支持直接处理视频批次
* single_frame: 单帧模式,每帧独立计算 crop_box
* batch_first_reuse: 批处理模式,首帧计算 crop_box,后续帧自动复用
Swwan/Image · 4 outputs
Kwai Kolors upscale workflow — v1.0