ComfyUI-WBLESS
ComfyUI custom node package. This custom node features multiple practical functions, including global variables, flow control, obtaining image or mask dimensions, and Dominant Axis Scale.
Get Started
Recommended
- Install via ComfyUI-Manager.
Manual
- Clone this repo into :
custom_nodescd ComfyUI/custom_nodes git clone https://github.com/LaoMaoBoss/ComfyUI-WBLESS.git - Start up ComfyUI.
NOTICE
- V3.5.0 Add the ToAPIs GPT Image 2 VIP node.
- V3.4.3 Fix Python 3.13/Lexicon loading, loguru fallback, and Jimeng SDK import errors.
- V3.4.2 RunningHUB LLM node supports multiple image inputs.
- V3.4.1 RunningHub LLM node adds image input.
- V3.4.0 Add RunningHUB LLM Node.
- V3.3.0 Add the RunningHub DeepSeek Chat node and update the DeepSeek Chat node.
- V3.2.0 Update Qwen API Node.
- V3.1.0 Update DeepSeek API Node.
- V3.0.1 Update image understanding capabilities.
- V3.0.0 Add Gemini Chat node.
- V2.9.0 Update RunningHUB API, API Core-RustFS Node.
- V2.8.0 Add API Core Node.
- V2.7.0 Add Image Mask Blend Node.
- V2.6.0 Add the Jimeng Image 4.0 node and enhance the functionality of the Text Block node.
- V2.5.0 Added Baseline Alignment (X) and Baseline Alignment (Y) nodes.
- V2.4.2 Fix the calculation error issue of the Area Based Scale (Pixel) node.
- V2.4.1 Restore the name
Area Based Scale (Size)toArea Based Scale. - V2.4.0 Add ImageHasAlpha and Area Based Scale (Pixel) nodes,Rename the Area Based Scale node to Area Based Scale (Size).
- V2.3.1 Add an ApplyMaskToAlpha node and add new settings to the Gradient node.
- V2.3.0 Add Gradient Node.
- V2.2.4 Fix the adaptation of the switch series nodes in the new version of ComfyUI.
- V2.2.3 Fix switch node runtime errors in certain environments.
- V2.2.2 Update the Overlay Text and Text Block nodes.
- V2.2.0 Update the Area Based Scale Node.
- V2.1.2 Import the cozy_comfyui module and fix the issue where users cannot import the cozy_comfyui module.
- V2.1.1 Fixed the Get Mask Size node returning wrong dimensions in certain scenarios.
- V2.1.0 Updated the Dominant Axis Scale, Get Image Size, and Get Mask Size nodes.
- V2.0.0 is released. This is the first public version. Version 1.0 is an internal test version and will not be made public.
The Nodes
Set Global Variable
The
Set Global Variablenode allows you to store your data in variables.See More Information
- The
InputandOutputnodes form a direct pipeline for better integration within workflows.- The
variable datais used for inputting variable values.Scopeis used to set the order in which variables are obtained. You just need to connect them in sequence one after another.variable_nameHere you can set the name of your variable.
Get Global Variable
The
Get Global Variablenode can retrieve data stored in variables.See More Information
- The
InputandOutputnodes form a direct pipeline for better integration within workflows.variable datais used for outputting the variable's value.Scopeis used to set the order in which variables are obtained. You just need to connect them in sequence one after another.variable_nameHere you can specify the variable you want to retrieve.
Inversed Switch
Used to control the direction of the workflow.
See More Information
- Connect the main workflow to the
Inputinterface, then connect theOutputto different branch workflows. By controlling thepathvalue of the node, you can determine which branch the workflow will take.- This node needs to be used in conjunction with
Switch.- The core logic of this node draws inspiration from ComfyUI-Impact-Pack. We would like to express our gratitude to the author of
ComfyUI-Impact-Packhere.
Switch
Select and retrieve data from different processes.
See More Information
Dominant Axis Scale
Smart scale input group A relative to input group B, using its longest side as the scaling axis.
See More Information
- Height a, Width a — these are the input dimensions you need to scale.
- Height b, Width b — these reference dimensions serve as the scaling baseline, which you can conceptualize as canvas dimensions.
- ratio — Input your scaling factor here.
- The output Width, Height, and scale_ratio govern different output formats.
Area Based Scale
Smart scale the area of input group A with reference to input group B, based on size.
See More Information
- Height a, Width a — these are the input dimensions you need to scale.
- Height b, Width b — these reference dimensions serve as the scaling baseline, which you can conceptualize as canvas dimensions.
- ratio — Input your scaling factor here.
- The output Width, Height, and scale_ratio govern different output formats.
- cap_threshold — the upper scaling limit threshold, beyond which the object will not scale any.
- enable_cap — threshold activation switch.
Area Based Scale (Pixel)
Smart scale the area of input group A with reference to input group B, based on Pixel.
See More Information
- The image_alpha port connects to an image with a transparency channel. You may need to use it in conjunction with ApplyMaskToAlpha. Unless you explicitly clear the transparency information of the image, please use it alongside ApplyMaskToAlpha to generate an image with transparency channel information. For specific usage, refer to the ApplyMaskToAlpha section.
- The image input port is used to connect the background image, or it can be referred to as the reference for scaling.
Get Image Size
Get Image Dimensions.
Get Mask Size
Get Mask Dimensions.
Overlay Text & Text Block
The function of drawing text on images consists of two nodes: a parent node and a child node. The parent node is
Overlay Text, which is used to control the overall settings, while the child node isText Block, responsible for controlling individual text blocks. These two nodes work together to build a powerful text system with professional-level text adjustment functions.
Gradient
Used to generate
gradientsortransparent gradientsfor images.See More Information
gradient_typeis used to set the gradient style.rotation_angleis used to set the gradient direction.- The
positionseries settings are used to control the gradient effect in detail.- The
colorseries settings are used to set gradient colors.- The
alphaseries settings are used to set gradient transparency.- The
maskoutput port will output the correspondingmaskbased on the transparent gradient.
ApplyMaskToAlpha
Set the image transparency based on the mask.
ImageHasAlpha
Determine whether the image contains transparency channel information.
Baseline Alignment (X) & Baseline Alignment (Y)
Input two different heights, then set a baseline. The output will be how much the center position of height a needs to be adjusted so that its bottom position aligns with the baseline position of height b.
Jimeng Image 4.0
Jimeng Image 4.0 node.
Image Mask Blend
Input a background image and an image to be blended, then input the mask of the area in the background image where blending is required. The node will scale and move the layer image based on the size and position of the mask.
API Core
API Core Transfer Node.
See More Information
- Please go to API Core to complete the key application.
- Please fill in your ComfyUI web address in
server_originfor uploading reference images. Note that this address must be a public IP address or domain name.- Once you fill in the
api_key, the node will automatically retrieve available models for you to select.
API Core-RustFS
API Core variant that uses RustFS to upload image URLs, and requires self-deployment of RustFS.
RunningHUB API
RunningHUB API Invocation Node.
Gemini Chat
Gemini Chat Invocation Node.
DeepSeek Chat
DeepSeek API Node.
Qwen Chat
Qwen API Node.
RunningHub DeepSeek Chat
RunningHub DeepSeek Relay Node.
See More Information
- Please visit RunningHub to apply for an API key.
- If you are a user from China, you can set the node’s
base_urlparameter tohttps://llm.runninghub.cn/v1and go to RunningHub to apply for an API key.
RunningHub LLM
RunningHub LLM Relay Node.
See More Information
- Please visit RunningHub to apply for an API key.
- If you are a user from China, you can set the node’s
base_urlparameter tohttps://llm.runninghub.cn/v1and go to RunningHub to apply for an API key.
ToAPIs GPT Image 2 VIP
ToAPIs GPT Image 2 VIP image generation node. Supports text-to-image, single-reference and multi-reference image-to-image.
See More Information
- Please go to ToAPIs to apply for an API key. The
api_keyfield can be left empty if theTOAPIS_API_KEYenvironment variable is set.api_basedefaults tohttps://toapis.com. Users in mainland China should change it tohttps://toapis.cn.- The
sizelist covers every preset ratio (1:1,3:2,2:3,4:3,3:4,5:4,4:5,16:9,9:16,2:1,1:2,21:9,9:21, plusauto). For an arbitrary ratio such as7:4or1:3, fill incustom_size; it overrides the preset and must stay within a 3:1 aspect ratio.resolution(1k/2k/4k) decides the actual pixel size, whilequality(low/medium/high) trades speed for fidelity.- Reference images must be public
http(s)URLs, so local ComfyUI images are uploaded to the ToAPIs/v1/uploads/imagesendpoint automatically. Each file is limited to 10MB, and an oversized PNG falls back to JPEG.- The generation interface is asynchronous. The node submits a task and then polls it, so
timeoutandpoll_intervalcontrol the total wait and the polling cadence.