Nodes/Tikpan Official Nodes/图片|Grok Imagine Image 参考图/修图
ComfyUI Node

图片|Grok Imagine Image 参考图/修图

Reference-image redraw

By htrert·Created 5 months ago·Updated 2 months ago· 1
图片|Grok Imagine Image 参考图/修图
  • 参考图1
  • 参考图2
  • 参考图3
  • 编辑结果
  • 渲染日志
💰_福利_💰
获取密钥请访问
节点说明
API_密钥sk-
编辑指令Keep the main subject consistent, improve the composition, lighting, details, and commercial product quality.
模型grok-imagine-image
生成张数1
画面比例auto
清晰度auto
中转站地址https://tikpan.com
返回方式云端链接|url
跳过错误false

This is the reference-image/editing sibling of the pack's plain Grok Imagine text-to-image node - same grok-imagine-image model, same ~0.208 RMB per image, but instead of "make something from nothing" it takes one to three reference images and redraws them to your instructions. Think of it as a cheap, hands-free retouch: swap a background while keeping the subject, drag a product into a new scene, push a mediocre render up to "commercial product shot" quality. For anyone doing e-commerce content - which is exactly who this pack is aimed at - that's the daily grind.

It's still a closed-model API call through the Tikpan reseller, so the same ground rules apply as every node in this pack: your images leave your machine, you pay per call, and the model's moderation is what it is. Editing a photo of a person with a closed service is where you'll feel that filter fastest.

How it works

Under the hood it POSTs your prompt plus the reference image(s) to Tikpan's /v1/images/edits endpoint, waits, and returns the edited result as an IMAGE tensor. 参考图1 is required and is the "what to change" anchor; 参考图2 and 参考图3 are optional style/fusion references (the node caps at three). The single most important thing you control is 编辑指令 - the prompt that tells the model what to keep and what to move. The default is decent ("keep the main subject consistent, improve composition, lighting, details"), but this is where you actually earn the output: be explicit about what must not change.

A practical pattern that comes straight from the pack's own docs: when you have multiple reference images, name each one's job in the prompt - "image 1 keeps the person, image 2 is the outfit reference, image 3 is the background." And when something is critical (a logo, a face, a product's proportions), say it must be preserved.

The inputs that matter

  • 参考图1 - required, the base image being redrawn.
  • 编辑指令 - the instruction text; English works better than Chinese with these models.
  • 画面比例 - auto follows the reference image, which is usually what you want for edits.
  • 清晰度 - 1k for quick drafts, 2k when you're actually shipping the file.
  • 生成张数 - more results = more billed images. Start at 1.

Optional: 跳过错误 gives you a black image instead of a hard crash when the API fails (good for batch retouching pipelines), and 返回方式 can stay on the default cloud URL.

Outputs are 编辑结果 (IMAGE) and 渲染日志 (STRING). Save/preview the image like any other node output; the log carries the raw API response when something goes wrong.

Install and first run

Same as the rest of the pack - nothing special to install, no model files:

cd ComfyUI/custom_nodes
git clone https://github.com/htrert/ComfyUI-Tikpan-Pro

Restart ComfyUI, paste your sk- key from https://tikpan.com into the API_密钥 field, and connect a Load Image to 参考图1. That's it - the code is plain requests + Pillow on ComfyUI's stock deps.

Common issues

The failure modes are mostly upstream. A 401 is a bad key, 402 is an empty balance, 429 means you're calling too fast. Beyond that, the two you'll actually hit: upload size - if a reference image is huge, compress it or drop the resolution first, and prefer a hosted URL over a giant local file; and the model ignoring part of your instruction - that's usually a prompt that didn't name what to preserve. Also worth knowing: if the request errors, check the log before retrying, because a failed call can still leave a charge on the account.

Category👑 Tikpan 官方独家节点/01 图片 Image

Inputs (15)

NameTypeDefaultDescription
💰_福利_💰COMBO1 options: 🔥 0.6元RMB兑1美元余额 | 全网底价 👉 https://tikpan.com
获取密钥请访问COMBO1 options: 👉 https://tikpan.com (官方授权Key获取点)
节点说明COMBO1 options: Grok Imagine Image Edit | /v1/images/edits | 参考图/修图 | 官方最多3张参考图 | 0.208 RMB per image
API_密钥STRINGsk-Tikpan 平台的 API 密钥,以 sk- 开头,从 https://tikpan.com 获取
参考图1IMAGE必填的主参考图,模型会基于这张图修图/重绘
编辑指令STRINGKeep the main subject consistent, improve the composition, lighting, details, and commercial product quality.告诉 AI 怎么改图,例如『换成海边背景,保持人物姿势不变』,推荐英文
模型COMBOgrok-imagine-image本节点使用的 Grok Imagine 修图模型
生成张数INT11–10一次生成几张结果;张数越多越慢越贵
画面比例COMBOauto画面比例:auto 跟随参考图;常用 1:1、16:9、9:16
清晰度COMBOauto分辨率档位:1k 省钱快出;2k 更精细但更慢更贵
参考图2optIMAGE可选第 2 张参考图(最多 3 张)
参考图3optIMAGE可选第 3 张参考图
中转站地址optCOMBOhttps://tikpan.comTikpan 中转站地址,一般保持默认即可
返回方式optCOMBO云端链接|urlurl=返回云端链接(推荐);b64_json=直接返回 Base64 数据
跳过错误optBOOLEANfalse开启后异常时返回黑图,不打断后续工作流

Outputs (2)

NameTypeDescription
编辑结果IMAGE
渲染日志STRING