营销图生图任务(带轮询)
Submit a marketing-image job, then babysit it until it's done
- result
- task_id
- status
Some cloud image services don't answer with a picture; they answer with a task ID and make you check back until the job finishes. That's the model MarketImageGenerateWithPolling wraps: it submits a marketing-image generation job to Alibaba Design's 智美-style service, then polls the status endpoint on a timer until the image is ready. For a batch of advertising/marketing creatives generated server-side, this is the "fire and wait" node.
The mechanism is a two-phase HTTP dance, all under the hood. First it POSTs your generate_params JSON to {base_url}/open/api/v1/ai/marketImageGenerate with Bearer auth, and the response's data field becomes your task_id. Then it loops, POSTing a query to {base_url}/open/api/v1/ai/getMainTask every poll_interval seconds (default 5) until the status hits a terminal state - SUCCESS/COMPLETED/FINISHED for done, FAILED/ERROR/CANCELLED for dead - or until max_poll_time (default 300s) runs out. You can set auto_start_polling to false to stop after task creation and poll elsewhere with the returned task_id.
The inputs you need
generate_params- required, the JSON body describing the marketing image job. This is service-specific; you need the 智美 API's schema.api_key- required Bearer key.user_id- required; the query payload includes it.app_name- defaultNHCI, theX-App-Nameheader.base_url- here's the gotcha: the default ishttps://pre-zhimei.alibabadesign.com. That's a pre-production host (the "pre-" is the tell). If you're pointing at the real service, this almost certainly needs changing to your actual environment.poll_interval(1–60s),max_poll_time(30–1800s),auto_start_polling.
Outputs
result- the full task response JSON when complete, or an error/timeout JSON otherwise.task_id- for resuming/querying elsewhere.status- a clean string:created,completed,failed,timeout, orerror. This is the field to branch on.
The honest trade-offs
This node blocks your workflow while polling - the queue won't advance for up to max_poll_time, and the node returns a timeout status if the job outlives the budget. For slow marketing renders (which are often 30s+ server-side), set max_poll_time generously or you'll get a timeout result with a valid task_id you can check manually. Also, like every API node in this pack, it uses verify=False (no SSL verification) and the README doesn't document it at all - this one is squarely an internal tool that happened to be open-sourced.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/jinchanz/ComfyUI-ADIC
Restart ComfyUI, or install "ComfyUI-ADIC" via ComfyUI Manager. requests only, no model downloads. Realistically: without a valid key and user_id on the 智美 service (and the right base_url), this node errors out fast - it's the most environment-specific node in the pack.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| generate_params | STRING | — | |
| app_name | STRING | NHCI | — |
| api_key | STRING | — | |
| user_id | STRING | — | |
| base_url | STRING | https://pre-zhimei.alibabadesign.com | — |
| poll_intervalopt | INT | 51–60 | — |
| max_poll_timeopt | INT | 30030–1800 | — |
| auto_start_pollingopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |
| task_id | STRING | — |
| status | STRING | — |