This node package contains automatic sampler setting according to model name in ComfyUI, adjusting image size according to specific constraints and some other nodes.
This node package includes nodes for automatically processing sampler settings based on model names and resizing images with specific constraints within ComfyUI. Subject to occasional updates. 本节点包包含在 ComfyUI 中根据模型名称自动处理采样器设置、按特定约束调整图像大小和一些其他节点。不定时更新中。
NodeAutoSampler
)ckpt_name
and selected mode
("Auto", "If_include", "Else", "User"). Uses conditional logic based on keywords in ckpt_name
or predefined settings.custom
ckpt_name
(STRING): Checkpoint name for logic.mode
(COMBO): Operation mode.if
, else
, user
conditions (steps, cfg, sampler).steps
(INT), cfg
(FLOAT), sampler
(STRING), text
(STRING summary).if_include
='light' to apply specific settings (e.g., low steps/cfg) when 'light' is in the model name.
NodeImageResize
)shortside
length, maintaining aspect ratio. Final width and height are both rounded up (ceil) to the nearest multiple of 16.Image/Transform
image
(IMAGE): Image to resize.shortside
(INT): Target length for the shorter side.image_resize
(IMAGE): Resized image.width
(INT): Final width (multiple of 16).height
(INT): Final height (multiple of 16).shortside
=768 results in 1024x768 output dimensions, as both are rounded up to the nearest 16x multiple.
NodeImagePre
)Image/Transform
image
(IMAGE): Required input image.mask
(MASK, optional): Optional input mask.shortside
(INT, {"default": 800, "min": 560, "max": 9600, "step": 16}): Target short side length (multiple of 16).batch
(INT, {"default": 1}): Batch size.ups
(FLOAT, {"default": 1.00}): Upscaling factor.image_resize
(IMAGE): Resized image.mask_resize
(MASK): Resized mask.empty_latent
(LATENT): Empty latent space (generated based on resized dimensions).batch
(INT): Pass - through batch size.width
(INT): Resized width (multiple of 16).height
(INT): Resized height (multiple of 16).ups
(FLOAT): Upscaling factor.width_ups
(INT): Upscaled width (multiple of 8).height_ups
(INT): Upscaled height (multiple of 8).shortside
= 768 and ups
= 1.5 outputs: image_resize
: 1024x768 image; width_resize
/height_resize
: 1024/768; ups
=1.5; width_ups
/height_ups
: 1536/1152.
custom_nodes
directory:
cd /path/to/comfyui/custom_nodes
git clone https://github.com/KERRY-YUAN/ComfyUI_Simple_Executor.gitNodeAutoSampler
)ckpt_name
中的关键字和选择的 mode
("Auto", "If_include", "Else", "User")设置采样器步数、CFG 和名称。custom
ckpt_name
(STRING): 用于逻辑判断的检查点名称。mode
(下拉框): 操作模式。if
, else
, user
条件的可选设置 (步数, cfg, 采样器)。steps
(INT), cfg
(FLOAT), sampler
(STRING), text
(STRING 摘要)。NodeImageResize
)shortside
长度调整图像大小,保持宽高比。最终宽度和高度都将向上(ceil)取整至最接近的 16 的倍数。Image/Transform
image
(IMAGE): 待调整图像。shortside
(INT): 目标短边长度。image_resize
(IMAGE): 调整后的图像。width
(INT): 最终宽度(16的倍数)。height
(INT): 最终高度(16的倍数)。shortside
=768 调整 800x600 图像,输出尺寸为 1024x768,因为宽高都向上取整至最接近的16倍数。NodeImagePre
)Image/Transform
image
(IMAGE): 必选输入图像mask
(MASK, 可选): 可选输入遮罩shortside
(INT, {"default": 800, "min": 560, "max": 9600, "step": 16}): 目标短边长度(16的倍数)batch
(INT, {"default": 1}): 批次数量ups
(FLOAT, {"default": 1.00}): 尺寸放大倍数image_resize
(IMAGE): 调整后的图像mask_resize
(MASK): 调整后的遮罩empty_latent
(LATENT): 空潜在空间(基于调整尺寸生成)batch
(INT): 透传的批次数量width
(INT) 调整后宽度(16的倍数)height
(INT): 调整后高度(16的倍数)ups
(FLOAT): 尺寸放大倍数width_ups
(INT): 放大宽度(8的倍数)height_ups
(INT): 放大高度(8的倍数)shortside
=768,ups
=1.5;输出:image_resize
: 1024x768图像;width_resize
/height_resize
: 1024/768; ups
=1.5; width_ups
/height_ups
: 1536/1152custom_nodes
目录:
cd /path/to/comfyui/custom_nodes
git clone https://github.com/KERRY-YUAN/ComfyUI_Simple_Executor.git