Aller au contenu Vous avez un workflow ComfyUI ? Obtenez une documentation lisible directement dans votre navigateur.Rendre un workflow lisible.Essayer maintenant ↗ ComfyUI_Swwan | ST StudioComfyUI_Swwan
抽取常用 ComfyUI 节点
抽取常用 ComfyUI 节点
Mainteneur@aining2022CClasse
Profil du package
- Statut
- Vérifié
- Éditeur
- @aining2022
- Source
- GitHub
- Étoiles
- 33
ComfyUI_Swwan
ComfyUI 自定义节点集合,收录个人常用节点,包含图像处理、Mask操作、数学运算、批处理等功能。
节点列表
图像处理 (Image)
Ressources connexes
9 connexions
Extraits de sources
1 extrait
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
↓
Nœuds dans ce pack
Nœuds 100
AddLabel
AddLabel
"
Swwan/Text · entrées 2 · paramètres 9 · sortie 1
AnyBooleanSwitch (Swwan)
AnyBooleanSwitch (Swwan)
Description compacte indisponible pour ce nœud.
Swwan/Utils · entrée 1 · paramètre 1 · sortie 1
AnySwitch (Swwan)
AnySwitch (Swwan)
Description compacte indisponible pour ce nœud.
Swwan/Utils · entrées 2 · paramètres 0 · sorties 2
BatchSlice
BatchSlice
Description compacte indisponible pour ce nœud.
Apt Preset/Data/😺Backup · entrée 1 · paramètres 2 · sortie 1
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 · entrées 2 · paramètres 0 · sortie 1
BoundedImageCropWithMask
BoundedImageCropWithMask
Crops images based on mask bounds with customizable padding.
Returns both cropped images and the calculated IMAGE_BOUNDS.
Swwan/Image · entrées 2 · paramètres 5 · sorties 2
ColorMatch
ColorMatch
"
Swwan/Image · entrées 2 · paramètres 3 · sortie 1
CrossFadeImages
CrossFadeImages
Description compacte indisponible pour ce nœud.
Swwan/Image · sortie 1
CrossFadeImagesMulti
CrossFadeImagesMulti
Description compacte indisponible pour ce nœud.
Swwan/Image · sortie 1
DrawMaskOnImage
DrawMaskOnImage
Applies the provided masks to the input images.
Swwan/Masking · entrées 2 · paramètres 3 · sortie 1
FastPreview
FastPreview
Experimental node for faster image previews by displaying through base64 it without saving to disk.
Swwan/Experimental · entrée 1 · paramètres 2 · sorties 0
GetImageRangeFromBatch
GetImageRangeFromBatch
"
Swwan/Image · sorties 2
GetImagesFromBatchIndexed
GetImagesFromBatchIndexed
"
Swwan/Image · sortie 1
GetImageSizeAndCount
GetImageSizeAndCount
"
Swwan/Image · entrée 1 · paramètres 0 · sorties 4
GetLatentRangeFromBatch
GetLatentRangeFromBatch
"
KJNodes/Latents · sortie 1
GetLatentSizeAndCount
GetLatentSizeAndCount
"
Swwan/Image · entrée 1 · paramètres 0 · sorties 6
Image_Resize_sum
Image_Resize_sum
"
Apt Preset/Image · entrées 4 · paramètres 8 · sorties 4
Image_Resize_sum_data
Image_Resize_sum_data
"
Apt Preset/Image/😺Backup · entrées 2 · paramètres 0 · sorties 11
Image_Resize_sum_restore
Image_Resize_sum_restore
"
Apt Preset/Image · entrées 2 · paramètres 2 · sorties 3
ImageAddMulti
ImageAddMulti
"
Swwan/Image · sortie 1
ImageAndMaskPreview
ImageAndMaskPreview
"
KJNodes/Masking · entrées 2 · paramètres 3 · sortie 1
ImageBatchExtendWithOverlap
ImageBatchExtendWithOverlap
"
Swwan/Image · sorties 3
ImageBatchFilter
ImageBatchFilter
Removes empty images from a batch
Swwan/Image · sorties 2
ImageBatchJoinWithTransition
ImageBatchJoinWithTransition
"
Swwan/Image · entrées 2 · paramètres 7 · sortie 1
ImageBatchMulti
ImageBatchMulti
"
Swwan/Image · sortie 1
ImageBatchRepeatInterleaving
ImageBatchRepeatInterleaving
"
Swwan/Image · entrées 2 · paramètre 1 · sorties 2
ImageBatchTestPattern
ImageBatchTestPattern
Description compacte indisponible pour ce nœud.
Swwan/Text · entrées 0 · paramètres 8 · sortie 1
ImageBlendSwwan
ImageBlendSwwan
Description compacte indisponible pour ce nœud.
Swwan/Image · sortie 1
ImageConcanate
ImageConcanate
"
Swwan/Image · entrées 2 · paramètres 2 · sortie 1
ImageConcatFromBatch
ImageConcatFromBatch
"
Swwan/Image · entrée 1 · paramètres 3 · sortie 1
ImageConcatMulti
ImageConcatMulti
"
Swwan/Image · sortie 1
ImageCropByMask
ImageCropByMask
Crops the input images based on the provided mask.
Swwan/Image · entrées 2 · paramètres 0 · sortie 1
ImageCropByMaskAndResize
ImageCropByMaskAndResize
Description compacte indisponible pour ce nœud.
Swwan/Image · entrées 2 · paramètres 4 · sorties 3
ImageCropByMaskBatch
ImageCropByMaskBatch
Crops the input images based on the provided masks.
Swwan/Image · entrées 2 · paramètres 5 · sorties 2
ImageGrabPIL
ImageGrabPIL
"
Swwan/Image · sortie 1
ImageGridComposite2x2
ImageGridComposite2x2
"
Swwan/Image · entrées 4 · paramètres 0 · sortie 1
ImageGridComposite3x3
ImageGridComposite3x3
"
Swwan/Image · entrées 9 · paramètres 0 · sortie 1
ImageGridtoBatch
ImageGridtoBatch
Converts a grid of images to a batch of images.
Swwan/Image · entrée 1 · paramètres 2 · sortie 1
ImageNormalize_Neg1_To_1
ImageNormalize_Neg1_To_1
"
Swwan/Image · entrée 1 · paramètres 0 · sortie 1
ImagePadForOutpaintMasked
ImagePadForOutpaintMasked
Description compacte indisponible pour ce nœud.
Image · entrées 2 · paramètres 5 · sorties 2
ImagePadForOutpaintTargetSize
ImagePadForOutpaintTargetSize
Description compacte indisponible pour ce nœud.
Image · sorties 2
ImagePadKJ
ImagePadKJ
Pad the input image and optionally mask with the specified padding.
Swwan/Image · entrées 4 · paramètres 7 · sorties 2
ImagePass
ImagePass
"
Swwan/Image · entrée 1 · paramètres 0 · sortie 1
ImagePrepForICLora
ImagePrepForICLora
Description compacte indisponible pour ce nœud.
Image · entrées 4 · paramètres 3 · sorties 2
ImageResizeByMegapixels
ImageResizeByMegapixels
"
Swwan/Image · sorties 5
ImageResizeKJ
ImageResizeKJ
"
Swwan/Image · sorties 3
ImageResizeKJv2Alternative
ImageResizeKJv2Alternative
Description compacte indisponible pour ce nœud.
ImageTensorList
ImageTensorList
"
Swwan/Image · entrées 2 · paramètres 0 · sortie 1
ImageUncropByMask
ImageUncropByMask
Description compacte indisponible pour ce nœud.
Swwan/Image · entrées 4 · paramètre 1 · sortie 1
ImageUpscaleWithModelBatched
ImageUpscaleWithModelBatched
"
Swwan/Image · entrées 2 · paramètre 1 · sortie 1
InsertImagesToBatchIndexed
InsertImagesToBatchIndexed
"
Swwan/Image · entrées 2 · paramètres 2 · sortie 1
InsertLatentToIndex
InsertLatentToIndex
"
KJNodes/Latents · sortie 1
IO_save_image
IO_save_image
Description compacte indisponible pour ce nœud.
Swwan/IO · entrée 1 · paramètres 6 · sortie 1
IO_save_image_format
IO_save_image_format
"
Swwan/IO · entrée 1 · paramètres 10 · sortie 1
LayerUtility: ColorImage (Swwan)
LayerUtility: ColorImage (Swwan)
Create a solid RGB image tensor without depending on ComfyUI_LayerStyle.
😺DzNodes/LayerUtility · entrées 0 · paramètres 3 · sortie 1
LayerUtility: CropByMask V2
LayerUtility: CropByMask V2
基于遮罩区域智能裁剪图像,支持高级检测算法。 功能特点: - 三种检测模式:maskarea(遮罩区域)、minboundingrect(最小边界矩形)、maxinscribedrect(最大内接矩形) - 可自定义边距保留(上、下、左、右) - 将尺寸调整为指定倍数(8、16、32、64、128、256、512) - 可选的手动裁剪框输入 - 返回裁剪后的图像、遮罩、裁剪框坐标和预览图 使用场景: - 提取遮罩区域进行集中处理 - 为修复工作流准备图像 - 优化处理区域以减少计算量
RunningHub/LayerUtility · sorties 4
LayerUtility: CropByMask V3
LayerUtility: CropByMask V3
Description compacte indisponible pour ce nœud.
RunningHub/LayerUtility · sorties 4
LayerUtility: CropByMask V4
LayerUtility: CropByMask V4
CropByMask V4 - 增强版智能裁剪节点
相比 V3 新增功能:
- reuse_crop_box: 复用首次计算的 crop_box,适合视频批量处理
- device: 支持 CPU/GPU 选择
RunningHub/LayerUtility · sorties 4
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 · sorties 5
LayerUtility: RestoreCropBox
LayerUtility: RestoreCropBox
将裁剪后的图像恢复到原始画布位置。 功能特点: - 将裁剪图像粘贴回原始坐标 - 支持基于遮罩的合成 - 自动处理 alpha 通道 - 支持批量处理 - 遮罩反转选项 使用场景: - 将处理后的区域恢复到原始图像 - 完成 裁剪 → 处理 → 恢复 工作流 - 无缝图像合成
RunningHub/LayerUtility · entrées 3 · paramètre 1 · sorties 2
LayerUtility: RestoreCropBox V2
LayerUtility: RestoreCropBox V2
RestoreCropBox V2 - 增强版裁剪还原节点
相比 V1 新增功能:
- feathering: 边缘羽化,解决粘贴时的色差/硬边问题
- device: 支持 CPU/GPU 选择
RunningHub/LayerUtility · entrées 4 · paramètres 3 · sorties 2
list_Merge
list_Merge
Description compacte indisponible pour ce nœud.
Apt Preset/Data/😺Backup · entrées 0 · paramètres 0 · sortie 1
list_num_range
list_num_range
Description compacte indisponible pour ce nœud.
Apt Preset/Data/😺Backup · entrées 0 · paramètres 3 · sorties 3
list_Slice
list_Slice
Description compacte indisponible pour ce nœud.
Apt Preset/Data/😺Backup · entrée 1 · paramètres 2 · sortie 1
list_Value
list_Value
Description compacte indisponible pour ce nœud.
Apt Preset/Data · entrées 0 · paramètres 2 · sorties 3
LoadAndResizeImage
LoadAndResizeImage
Description compacte indisponible pour ce nœud.
Swwan/Image · sorties 5
LoadImagesFromFolderKJ
LoadImagesFromFolderKJ
""Loads images from a folder into a batch, images are resized and loaded into a batch.""
Swwan/Image · entrées 0 · paramètres 7 · sorties 4
LoadVideosFromFolder
LoadVideosFromFolder
Description compacte indisponible pour ce nœud.
Swwan/Misc · entrées 0 · paramètres 10 · sortie 1
Mask_transform_sum
Mask_transform_sum
Description compacte indisponible pour ce nœud.
Apt Preset/Mask · entrées 2 · paramètres 15 · sorties 2
math_calculate
math_calculate
"
Apt Preset/Data · entrées 3 · paramètres 2 · sorties 3
math_Remap_data
math_Remap_data
Description compacte indisponible pour ce nœud.
Apt Preset/Data · entrées 2 · paramètres 5 · sorties 2
MathExpression_UTK
MathExpression_UTK
Description compacte indisponible pour ce nœud.
Swwan/Math · sorties 2
MergeBatch
MergeBatch
Description compacte indisponible pour ce nœud.
Apt Preset/Data/😺Backup · entrées 0 · paramètres 0 · sortie 1
MergeImageChannels
MergeImageChannels
"
Swwan/Image · entrées 4 · paramètres 0 · sortie 1
MiniMaxH3MemoryEfficientSageAttentionPatchKJAlternative
MiniMaxH3MemoryEfficientSageAttentionPatchKJAlternative
Description compacte indisponible pour ce nœud.
PadImageBatchInterleaved
PadImageBatchInterleaved
"
Swwan/Image · entrée 1 · paramètres 3 · sorties 2
PatchSageAttentionKJAlternative
PatchSageAttentionKJAlternative
Description compacte indisponible pour ce nœud.
PreviewAnimation
PreviewAnimation
Description compacte indisponible pour ce nœud.
Swwan/Image · entrées 2 · paramètre 1 · sorties 0
raiseExceptionOnTrue
raiseExceptionOnTrue
当输入为True时抛出自定义异常,用于终止工作流节省计算成本
Swwan/Utils · entrées 0 · paramètres 2 · sortie 1
RemapImageRange
RemapImageRange
"
Swwan/Image · entrée 1 · paramètres 3 · sortie 1
ReplaceImagesInBatch
ReplaceImagesInBatch
"
Swwan/Image · sorties 2
ReverseImageBatch
ReverseImageBatch
"
Swwan/Image · sortie 1
RGBA_Multi_Save
RGBA_Multi_Save
"
Swwan/RGBA · entrées 2 · paramètres 12 · sorties 0
RGBA_Safe_Post
RGBA_Safe_Post
"
Swwan/RGBA · entrées 2 · paramètres 2 · sorties 2
RGBA_Safe_Pre
RGBA_Safe_Pre
"
Swwan/RGBA · entrées 2 · paramètres 0 · sorties 3
RGBA_Save
RGBA_Save
"
Swwan/RGBA · entrées 2 · paramètre 1 · sorties 0
SaveImageKJ
SaveImageKJ
Saves the input images to your ComfyUI output directory.
Swwan/Image · entrées 2 · paramètres 3 · sortie 1
SaveImageWithAlpha
SaveImageWithAlpha
"
Swwan/Image · entrées 2 · paramètre 1 · sorties 0
SaveStringKJ
SaveStringKJ
Saves the input string to your ComfyUI output directory.
Swwan/Misc · entrée 1 · paramètres 3 · sortie 1
sch_image
sch_image
Description compacte indisponible pour ce nœud.
Apt Preset/Data/Schedule · sortie 1
sch_mask
sch_mask
Description compacte indisponible pour ce nœud.
Apt Preset/Data/Schedule · sortie 1
sch_Prompt
sch_Prompt
Description compacte indisponible pour ce nœud.
Apt Preset/Data/Schedule · entrée 1 · paramètres 3 · sortie 1
sch_split_text
sch_split_text
"
Apt Preset/Data/Schedule · entrées 0 · paramètres 4 · sorties 2
sch_text
sch_text
Description compacte indisponible pour ce nœud.
Apt Preset/Data/Schedule · entrées 0 · paramètres 3 · sorties 3
sch_Value
sch_Value
Description compacte indisponible pour ce nœud.
Apt Preset/Data/Schedule · entrées 0 · paramètres 3 · sorties 4
Seed (rgthree)
Seed (rgthree)
增强的种子节点
Rgthree · entrées 0 · paramètre 1 · sortie 1
ShuffleImageBatch
ShuffleImageBatch
Description compacte indisponible pour ce nœud.
Swwan/Image · sortie 1
SplitImageChannels
SplitImageChannels
"
Swwan/Image · entrée 1 · paramètres 0 · sorties 4
SwwanColorShiftFix
SwwanColorShiftFix
Description compacte indisponible pour ce nœud.
SwwanCropByMaskV5
SwwanCropByMaskV5
CropByMask V5 - 批处理增强版智能裁剪节点
相比 V4 新增功能:
- batch_mode: 批处理模式,支持直接处理视频批次
* single_frame: 单帧模式,每帧独立计算 crop_box
* batch_first_reuse: 批处理模式,首帧计算 crop_box,后续帧自动复用
Swwan/Image · sorties 4
Kwai Kolors upscale workflow — v1.0