参数说明
可选参数
输出
使用示例
Recraft Text to Image 工作流示例
Recraft Text to Image 工作流示例
工作原理
节点处理流程:- 收集输入的控制参数(colors和background_color)
- 将这些参数整合到一个结构化的控制对象中
- 输出此控制对象,可连接到各种Recraft生成节点
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
为Recraft图像生成提供高级控制参数的节点
| 参数 | 类型 | 说明 |
|---|---|---|
| colors | Recraft Color | 用于生成图像的颜色控制 |
| background_color | Recraft Color | 背景颜色控制 |
| 输出 | 类型 | 说明 |
|---|---|---|
| recraft_controls | Recraft Controls | 控制配置对象,连接到Recraft生成节点 |
class RecraftControlsNode:
"""
Create Recraft Controls for customizing Recraft generation.
"""
RETURN_TYPES = (RecraftIO.CONTROLS,)
RETURN_NAMES = ("recraft_controls",)
DESCRIPTION = cleandoc(__doc__ or "") # Handle potential None value
FUNCTION = "create_controls"
CATEGORY = "api node/image/Recraft"
@classmethod
def INPUT_TYPES(s):
return {
"required": {
},
"optional": {
"colors": (RecraftIO.COLOR,),
"background_color": (RecraftIO.COLOR,),
}
}
def create_controls(self, colors: RecraftColorChain=None, background_color: RecraftColorChain=None):
return (RecraftControls(colors=colors, background_color=background_color), )