Baidu Meux ComfyTools is a collection of custom nodes for ComfyUI used by the Baidu Meux asset platform.
Current version: 1.7.1
Main nodes:
MeuxImageLoader: load an image fromComfyUI/inputor an HTTP/HTTPS URL.MeuxMaskLoader: load a mask fromComfyUI/inputor an HTTP/HTTPS URL and align it to a reference image.MeuxMaskFillHoles: fill enclosed holes in a mask.MeuxMaskBlurPlus: blur or feather a mask.MeuxSeed: workflow-compatible seed passthrough node.MeuxMultiSaveImage: save up to sixteen image batches with optional resizing.MeuxAdvancedImageCrop: crop images by pixels or percentage with optional alignment.MeuxSimpleLLMNode: call a chat-completions style LLM API inside a workflow.MeuxTextAreaInput: multi-line text input helper.MeuxArtisticTextPreview: advanced transparent text preview with fill, outline, spacing, shadow, glow, and mask output.MeuxSmartEmptyLatent: generate a safe-sized empty latent tensor.MeuxSizePresetSafe: compute aligned generation sizes.MeuxOutpaintSizePresetSafe: compute safe per-side outpaint expansion sizes.MeuxSmartExactResize: crop or pad to an exact target size.MeuxRMBG: BiRefNet-based background removal.MeuxRealESRGANUpscale: local RealESRGAN upscaling.
Workflow-compatible aliases:
Mask Fill HolesMaskBlur+Seed
- v1.7.1
- Updated URL persistence so downloaded files are stored under
ComfyUI/input/meux_downloads. - Added
text_alignandvertical_aligncontrols toMeuxArtisticTextPreview.
- Updated URL persistence so downloaded files are stored under
- v1.7.0
- Added
MeuxArtisticTextPreviewfor transparent text preview rendering with fill, outline, spacing, mask output, and preset-based effects. - Added a project-level
fonts/directory and made it the first font lookup location for the preview node. - Added node-specific parameter documentation for
MeuxArtisticTextPreview.
- Added
- v1.6.0
- Added
MeuxMaskLoaderas a dedicated mask-loading node. - Added workflow-compatible mask utility nodes:
MeuxMaskFillHoles,MeuxMaskBlurPlus,MeuxSeed. - Registered compatibility aliases:
Mask Fill Holes,MaskBlur+,Seed. - Added
scipydependency for hole-filling behavior aligned with upstream workflows.
- Added
- v1.5.0
- Added
MeuxRMBGfor local/remote BiRefNet background removal. - Added
MeuxRealESRGANUpscalefor local RealESRGAN upscaling.
- Added
- v1.4.0
- Added
MeuxOutpaintSizePresetSafe. - Capped size-related inputs at 4096.
- Added
- v1.3.0
- Added
MeuxSmartEmptyLatent,MeuxSizePresetSafe, andMeuxSmartExactResize.
- Added
- v1.2.0
- Added
MeuxImageLoaderwith URL downloading support.
- Added
- v1.1.0
- Restructured the package into modular files under
nodes/.
- Restructured the package into modular files under
- v1.0.0
- Initial release with
MeuxMultiSaveImage.
- Initial release with
-
Clone into
ComfyUI/custom_nodes/:cd ComfyUI/custom_nodes git clone https://github.com/fchangjun/Baidu_Meux_ComfyTools.git -
Update when needed:
cd ComfyUI/custom_nodes/Baidu_Meux_ComfyTools git pull -
Install dependencies:
cd ComfyUI/custom_nodes/Baidu_Meux_ComfyTools pip install -r requirements.txt -
Restart ComfyUI.
source_type = local: select a file fromComfyUI/inputsource_type = url: download from an HTTP/HTTPS URL- Downloaded URL files are persisted under
ComfyUI/input/meux_downloadswhenpersist_to_input = true - Outputs
IMAGEand the derived mask from alpha or grayscale when present
reference_imageis required so the mask can match the image sizesource_type = local | url- Supports
mask_channel,mask_invert, andresize_to_reference - Outputs native ComfyUI-style
MASK
Recommended pairing:
MeuxImageLoader.image-> downstream image pipelineMeuxImageLoader.image->MeuxMaskLoader.reference_imageMeuxMaskLoader.mask-> downstream mask pipeline
MeuxMaskFillHoles/Mask Fill Holes: fill enclosed regions inside a maskMeuxMaskBlurPlus/MaskBlur+: feather a maskMeuxSeed/Seed: expose a workflow-compatible seed value
MeuxMultiSaveImage: batch image savingMeuxAdvancedImageCrop: crop by pixels or percentageMeuxSimpleLLMNode: direct LLM API callsMeuxTextAreaInput: long prompt inputMeuxArtisticTextPreview: advanced transparent text preview with optional gradient fill, outline, shadow, inner shadow, glow, and mask outputMeuxSmartEmptyLatent: safe latent initializationMeuxSizePresetSafe: safe size planningMeuxOutpaintSizePresetSafe: safe outpaint size planningMeuxSmartExactResize: exact resize with crop/pad logicMeuxRMBG: local background removalMeuxRealESRGANUpscale: local image upscaling
- Outputs a transparent
IMAGEpreview and a matchingMASK - Reads fonts from
Baidu_Meux_ComfyTools/fontsfirst, then falls back to bundled/system fonts - Supports
fixedandfitfont sizing modes - Supports
font_name,char_spacing,bold, anditalic - Supports solid or gradient fill
- Supports solid or gradient outline
- Supports shadow, inner shadow, and outer glow
- Supports transparent or colored preview backgrounds
Recommended first test:
- Add
MeuxArtisticTextPreview - Set
text = Hello - Set
font_size_mode = fixed - Set
font_size = 128 - Set
outline_type = solid - Connect the
imageoutput to a preview or save node
Parameters:
-
Basic
text: preview text, supports multiple linesfont_name: font dropdown, reads projectfonts/firstwidth/height: output canvas sizefont_size_mode:fixeduses the exact font size,fitscales text to the canvasfont_size: base font size or max fitting sizechar_spacing: character spacing in pixelsline_spacing: line spacing in pixels;0keeps the automatic spacing rule, positive values increase spacing, negative values pull lines closer togetherbold: prefer bold font variants, otherwise use a fallback bold draw modeitalic: prefer italic font variants, otherwise use a fallback italic transformbackground_color: preview background colorbackground_opacity: preview background opacity,0means fully transparentpadding_percent: safe area margin inside the canvas
-
Fill
fill_type:solid,gradient, ornonefill_color_1: solid fill color, or the start color of a gradientfill_color_2: end color of a gradientfill_direction: fill gradient direction
-
Outline
outline_type:none,solid, orgradientoutline_width: outline thicknessoutline_opacity: outline alphaoutline_color_1: solid outline color, or the start color of an outline gradientoutline_color_2: end color of an outline gradientoutline_direction: outline gradient direction
-
Effects
effect_preset: one-click effect preseteffect_strength: preset intensity multipliershadow_mode:presetuses preset shadow settings,customignores preset shadow placement/blur and uses manual values belowshadow_color: shadow color; still works in preset modeshadow_offset_x: custom shadow horizontal offsetshadow_offset_y: custom shadow vertical offsetshadow_opacity: custom shadow alphashadow_blur: custom shadow blur radius;0means a solid hard-edged shadow,> 0means a blurred shadow- Presets:
none: no extra effectsoft_shadow: light shadowheavy_shadow: heavier shadowsoft_glow: soft glowneon_glow: stronger glowengraved: inner-shadow style engraved lookshadow_glow: combines shadow and glow
-
Outputs
image: rendered preview imagemask: alpha mask derived from the text result
Baidu_Meux_ComfyTools/
├── __init__.py
├── fonts/
│ └── README.md
├── pyproject.toml
├── requirements.txt
└── nodes/
├── advanced_image_crop.py
├── image_loader.py
├── mask_blur_plus.py
├── mask_fill_holes.py
├── mask_loader.py
├── artistic_text_preview.py
├── multi_save_image.py
├── outpaint_size_preset_safe.py
├── realesrgan_upscale.py
├── rmbg_birefnet.py
├── seed_node.py
├── simple_llm_node.py
├── size_preset_safe.py
├── smart_empty_latent.py
├── smart_exact_resize.py
└── text_area_input.py
- ComfyUI
- PyTorch
- Pillow
- NumPy
- Requests
- transformers
- torchvision
- realesrgan
- scipy
- Repository: fchangjun/Baidu_Meux_ComfyTools
- Issues: GitHub Issues
Baidu Meux ComfyTools 是一组用于 ComfyUI 的自定义节点,服务于百度 Meux 资产平台相关工作流。
当前版本:1.7.1
主要节点:
MeuxImageLoader:从ComfyUI/input或 HTTP/HTTPS URL 加载图片MeuxMaskLoader:从ComfyUI/input或 HTTP/HTTPS URL 加载遮罩,并对齐到参考图尺寸MeuxMaskFillHoles:填充遮罩内部封闭空洞MeuxMaskBlurPlus:对遮罩做模糊/羽化MeuxSeed:兼容工作流的种子透传节点MeuxMultiSaveImage:一次保存最多 16 组图像,可选统一尺寸MeuxAdvancedImageCrop:按像素或百分比裁剪图像MeuxSimpleLLMNode:在工作流中调用聊天式 LLM 接口MeuxTextAreaInput:多行文本输入辅助节点MeuxArtisticTextPreview:在透明画布上渲染高级文字预览,支持填充、描边、字距、阴影、内阴影、外发光,并输出遮罩MeuxSmartEmptyLatent:生成安全尺寸的空白 latentMeuxSizePresetSafe:计算安全生成尺寸MeuxOutpaintSizePresetSafe:计算安全外扩尺寸MeuxSmartExactResize:精确尺寸裁剪/补边MeuxRMBG:基于 BiRefNet 的抠图节点MeuxRealESRGANUpscale:本地 RealESRGAN 放大节点
工作流兼容别名:
Mask Fill HolesMaskBlur+Seed
- v1.7.1
- 调整 URL 落盘位置,下载文件现在保存到
ComfyUI/input/meux_downloads - 为
MeuxArtisticTextPreview新增text_align和vertical_align对齐控制
- 调整 URL 落盘位置,下载文件现在保存到
- v1.7.0
- 新增
MeuxArtisticTextPreview,用于透明背景文字预览,支持填充、描边、字距、遮罩输出和预设效果。 - 新增项目级
fonts/目录,并作为预览节点的第一字体读取位置。 - 补充
MeuxArtisticTextPreview的节点参数说明文档。
- 新增
- v1.6.0
- 新增独立遮罩加载节点
MeuxMaskLoader - 新增工作流兼容节点
MeuxMaskFillHoles、MeuxMaskBlurPlus、MeuxSeed - 注册兼容别名
Mask Fill Holes、MaskBlur+、Seed - 新增
scipy依赖,用于按上游逻辑填充遮罩空洞
- 新增独立遮罩加载节点
- v1.5.0
- 新增
MeuxRMBG,支持本地/远端 BiRefNet 抠图 - 新增
MeuxRealESRGANUpscale,支持本地 RealESRGAN 放大
- 新增
- v1.4.0
- 新增
MeuxOutpaintSizePresetSafe - 尺寸相关输入上限统一为 4096
- 新增
- v1.3.0
- 新增
MeuxSmartEmptyLatent、MeuxSizePresetSafe、MeuxSmartExactResize
- 新增
- v1.2.0
- 新增
MeuxImageLoader,支持 URL 下载
- 新增
- v1.1.0
- 重构为
nodes/模块化结构
- 重构为
- v1.0.0
- 发布
MeuxMultiSaveImage初版
- 发布
-
克隆到
ComfyUI/custom_nodes/:cd ComfyUI/custom_nodes git clone https://github.com/fchangjun/Baidu_Meux_ComfyTools.git -
更新代码:
cd ComfyUI/custom_nodes/Baidu_Meux_ComfyTools git pull -
安装依赖:
cd ComfyUI/custom_nodes/Baidu_Meux_ComfyTools pip install -r requirements.txt -
重启 ComfyUI。
source_type = local:从ComfyUI/input选择本地文件source_type = url:运行时下载 HTTP/HTTPS 图片persist_to_input = true时,URL 下载文件会保存到ComfyUI/input/meux_downloads- 输出
IMAGE,以及图片自带 alpha/灰度派生的MASK
- 必须连接
reference_image,用于保证遮罩尺寸和原图一致 source_type = local | url- 支持
mask_channel、mask_invert、resize_to_reference - 输出原生兼容的
MASK
推荐连法:
MeuxImageLoader.image接图像处理链路MeuxImageLoader.image接MeuxMaskLoader.reference_imageMeuxMaskLoader.mask接遮罩处理链路
MeuxMaskFillHoles/Mask Fill Holes:填充遮罩内部封闭区域MeuxMaskBlurPlus/MaskBlur+:做遮罩羽化MeuxSeed/Seed:输出兼容工作流的 seed
MeuxMultiSaveImage:批量保存图片MeuxAdvancedImageCrop:按像素或百分比裁剪MeuxSimpleLLMNode:直接调用 LLM APIMeuxTextAreaInput:长文本输入MeuxArtisticTextPreview:高级透明文字预览节点,支持渐变填充、描边、字距、阴影、内阴影、外发光和遮罩输出MeuxSmartEmptyLatent:安全 latent 初始化MeuxSizePresetSafe:安全尺寸规划MeuxOutpaintSizePresetSafe:安全外扩尺寸规划MeuxSmartExactResize:精确尺寸裁剪/补边MeuxRMBG:本地抠图MeuxRealESRGANUpscale:本地放大
- 输出透明背景
IMAGE预览图,以及对应的MASK - 优先读取
Baidu_Meux_ComfyTools/fonts目录中的字体,再回退到内置字体和系统字体 - 支持
fixed和fit两种字号模式 - 支持
font_name、char_spacing、bold、italic - 支持纯色或渐变填充
- 支持纯色或渐变描边
- 支持阴影、内阴影、外发光
- 支持透明或纯色背景预览
建议先用下面这组参数测试:
- 添加
MeuxArtisticTextPreview - 设置
text = Hello - 设置
font_size_mode = fixed - 设置
font_size = 128 - 设置
outline_type = solid - 将
image输出连接到预览或保存节点
参数说明:
-
基础参数
text:预览文字,支持多行font_name:字体下拉,优先读取项目根目录fonts/width/height:输出画布尺寸font_size_mode:fixed使用固定字号,fit自动适配画布font_size:基础字号,或自动适配时的最大字号char_spacing:字符间距,单位为像素line_spacing:行间距,单位为像素;0表示继续使用自动行间距规则,正数拉开行距,负数压缩行距bold:优先匹配粗体字体,没有时走伪粗体回退italic:优先匹配斜体字体,没有时走伪斜体回退background_color:预览背景颜色background_opacity:背景透明度,0表示完全透明padding_percent:文字与画布边缘的安全边距比例
-
填充参数
fill_type:solid纯色,gradient渐变,none无填充fill_color_1:纯色填充时使用它;渐变时是起始色fill_color_2:渐变结束色fill_direction:填充渐变方向
-
描边参数
outline_type:none无描边,solid纯色描边,gradient渐变描边outline_width:描边宽度outline_opacity:描边透明度outline_color_1:纯色描边时使用它;渐变时是起始色outline_color_2:渐变结束色outline_direction:描边渐变方向
-
效果参数
effect_preset:一键效果预设effect_strength:预设效果强度倍率shadow_mode:preset使用预设阴影参数,custom使用下面的自定义阴影参数shadow_color:阴影颜色;在预设模式下也会生效shadow_offset_x:自定义阴影水平偏移shadow_offset_y:自定义阴影垂直偏移shadow_opacity:自定义阴影透明度shadow_blur:自定义阴影模糊半径;0表示实心硬边阴影,> 0表示模糊阴影- 预设说明:
none:不加额外效果soft_shadow:轻阴影heavy_shadow:重阴影soft_glow:柔和发光neon_glow:更强的霓虹发光engraved:偏内阴影的雕刻感shadow_glow:阴影和发光组合
-
输出
image:渲染后的预览图mask:由文字 alpha 生成的遮罩
Baidu_Meux_ComfyTools/
├── __init__.py
├── fonts/
│ └── README.md
├── pyproject.toml
├── requirements.txt
└── nodes/
├── advanced_image_crop.py
├── image_loader.py
├── mask_blur_plus.py
├── mask_fill_holes.py
├── mask_loader.py
├── artistic_text_preview.py
├── multi_save_image.py
├── outpaint_size_preset_safe.py
├── realesrgan_upscale.py
├── rmbg_birefnet.py
├── seed_node.py
├── simple_llm_node.py
├── size_preset_safe.py
├── smart_empty_latent.py
├── smart_exact_resize.py
└── text_area_input.py
- ComfyUI
- PyTorch
- Pillow
- NumPy
- Requests
- transformers
- torchvision
- realesrgan
- scipy
- 仓库地址:fchangjun/Baidu_Meux_ComfyTools
- 问题反馈:GitHub Issues