工具节点

工具节点提供各种辅助功能,帮助构建和优化工作流。

节点列表

1. EmptyLatentImage

创建空白潜在空间,是文生图工作流的起点。

{
  "5": {
    "inputs": {
      "width": 512,
      "height": 512,
      "batch_size": 1
    },
    "class_type": "EmptyLatentImage"
  }
}
EmptyLatentImage.LATENT → KSampler.latent_image

2. LatentUpscale

放大潜在空间。

{
  "31": {
    "inputs": {
      "upscale_method": "lanczos",
      "width": 1024,
      "height": 1024,
      "crop": "disabled",
      "samples": ["3", 0]
    },
    "class_type": "LatentUpscale"
  }
}
KSampler.LATENT → LatentUpscale.samples
LatentUpscale.LATENT → KSampler2.latent_image

3. TextConcatenate

连接多个文本。

{
  "32": {
    "inputs": {
      "separator": ", ",
      "text1": "beautiful landscape",
      "text2": "mountains, sunset"
    },
    "class_type": "TextConcatenate"
  }
}
PrimitiveNode1.TEXT → TextConcatenate.text1
PrimitiveNode2.TEXT → TextConcatenate.text2
TextConcatenate.TEXT → CLIPTextEncode.text

4. KSamplerSelect

选择采样器。

{
  "33": {
    "inputs": {
      "sampler_name": "euler"
    },
    "class_type": "KSamplerSelect"
  }
}
KSamplerSelect.SAMPLER → KSampler.sampler

5. SchedulerSelect

选择调度器。

{
  "34": {
    "inputs": {
      "scheduler": "karras"
    },
    "class_type": "SchedulerSelect"
  }
}
SchedulerSelect.SCHEDULER → KSampler.scheduler

6. LoadImage

加载图像文件。

{
  "35": {
    "inputs": {
      "image": "example.png"
    },
    "class_type": "LoadImage"
  }
}
LoadImage.IMAGE → VAEEncode.pixels
LoadImage.MASK → VAEEncode.for_mask

最佳实践

潜在空间管理

文本处理

采样优化

图像加载

常见问题

Q1: 图像尺寸有什么要求?

A: 宽度和高度必须是64的倍数。

Q2: batch_size设置多少合适?

A: 根据显存大小,通常1-4之间。

Q3: 如何提高分辨率?

A: 使用LatentUpscale或ImageUpscale节点。

Q4: 采样器和调度器如何选择?

A: euler+karras是很好的起点,根据需求调整。

Q5: 如何加载图像?

A: 使用LoadImage节点,图像放在input/目录。

相关节点

工作流示例

更新日志