Nodes/ComfyUI-Kongshan-Nodes/CLI 图片输入转临时文件
ComfyUI Node

CLI 图片输入转临时文件

把 ComfyUI 图片和提示词写入临时文件,并生成可交给外部 CLI 执行的命令。

By kongshan4219·Created 2 months ago·Updated 2 months ago· 0
CLI 图片输入转临时文件
  • image
  • reference_image
  • reference
  • command
  • output_path
  • prompt_path
  • image_path
  • reference_path
command_templateagy --print "Create exactly one final e-commerce product image. Use product image: {image_path}. Use reference image if provided: {reference_path}. Read the detailed design prompt from: {prompt_path}. Save the final image as a PNG file exactly at: {output_path}. After saving, print only the saved image path."
prompt
output_directoryimage_pipeline/antigravity_cli
output_filenameantigravity_result.png
source_image_path
CategoryKongshan/CLI

Inputs (8)

NameTypeDefaultDescription
command_templateSTRINGagy --print "Create exactly one final e-commerce product image. Use product image: {image_path}. Use reference image if provided: {reference_path}. Read the detailed design prompt from: {prompt_path}. Save the final image as a PNG file exactly at: {output_path}. After saving, print only the saved image path."命令模板。可使用 {prompt_path}、{image_path}、{reference_path}、{output_dir}、{output_path} 占位符,节点会替换成实际路径。
promptSTRING写入临时 txt 的完整提示词。外部 CLI 可通过 {prompt_path} 读取。
imageIMAGE写入临时 PNG 的商品图。外部 CLI 可通过 {image_path} 读取。
output_directorySTRINGimage_pipeline/antigravity_cli期望输出目录。相对路径会放在 ComfyUI output 目录下;绝对路径会直接使用。留空且连接 source_image_path 时,保存到 white_background 同级的 1688_main。
output_filenameSTRINGantigravity_result.png期望输出文件名。填写时节点会保留扩展名并追加时间戳;留空且连接 source_image_path 时,使用源图片名并把 white_background 替换为 1688_main。
reference_imageoptIMAGE直接连接的参考图,会写入临时 PNG 并作为 {reference_path}。优先级高于 reference。
referenceoptKS_REFERENCE参考对象。若包含 image 会写入临时 PNG;否则使用其中 path 作为 {reference_path}。
source_image_pathoptSTRING源图片路径。output_directory 留空时用它推导输出目录;output_filename 留空时用源图片名派生输出文件名。

Outputs (5)

NameTypeDescription
commandSTRING
output_pathSTRING
prompt_pathSTRING
image_pathSTRING
reference_pathSTRING