ComfyUI Node
CLI 图片输入转临时文件
把 ComfyUI 图片和提示词写入临时文件,并生成可交给外部 CLI 执行的命令。
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)
| Name | Type | Default | Description |
|---|---|---|---|
| command_template | STRING | agy --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} 占位符,节点会替换成实际路径。 |
| prompt | STRING | 写入临时 txt 的完整提示词。外部 CLI 可通过 {prompt_path} 读取。 | |
| image | IMAGE | 写入临时 PNG 的商品图。外部 CLI 可通过 {image_path} 读取。 | |
| output_directory | STRING | image_pipeline/antigravity_cli | 期望输出目录。相对路径会放在 ComfyUI output 目录下;绝对路径会直接使用。留空且连接 source_image_path 时,保存到 white_background 同级的 1688_main。 |
| output_filename | STRING | antigravity_result.png | 期望输出文件名。填写时节点会保留扩展名并追加时间戳;留空且连接 source_image_path 时,使用源图片名并把 white_background 替换为 1688_main。 |
| reference_imageopt | IMAGE | 直接连接的参考图,会写入临时 PNG 并作为 {reference_path}。优先级高于 reference。 | |
| referenceopt | KS_REFERENCE | 参考对象。若包含 image 会写入临时 PNG;否则使用其中 path 作为 {reference_path}。 | |
| source_image_pathopt | STRING | 源图片路径。output_directory 留空时用它推导输出目录;output_filename 留空时用源图片名派生输出文件名。 |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| command | STRING | — |
| output_path | STRING | — |
| prompt_path | STRING | — |
| image_path | STRING | — |
| reference_path | STRING | — |