Documentation Index
Fetch the complete documentation index at: https://dripart-fix-cloud-button-text-1773163393.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Recraft Controls 节点允许你定义一系列控制参数(如颜色和背景颜色指导),用于精确指导Recraft的图像生成过程。这个节点将多种控制输入整合为一个统一的控制对象。
参数说明
可选参数
| 参数 | 类型 | 说明 |
|---|
| colors | Recraft Color | 用于生成图像的颜色控制 |
| background_color | Recraft Color | 背景颜色控制 |
| 输出 | 类型 | 说明 |
|---|
| recraft_controls | Recraft Controls | 控制配置对象,连接到Recraft生成节点 |
使用示例
Recraft Text to Image 工作流示例
Recraft Text to Image 工作流示例
工作原理
节点处理流程:
- 收集输入的控制参数(colors和background_color)
- 将这些参数整合到一个结构化的控制对象中
- 输出此控制对象,可连接到各种Recraft生成节点
当连接到Recraft生成节点后,这些控制参数会影响AI的生成过程,使AI能够考虑多种因素,而不仅仅是文本提示的语义内容。如果配置了颜色输入,AI将尝试在生成的图像中合理地使用这些颜色。
源码参考
[节点源码 (更新于2025-05-03)]
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), )