A small Typer CLI to submit ComfyUI API prompts, poll async completion, and download generated .glb outputs.
- Reads ComfyUI server URL from
config.json - Submits prompt JSON to
POST /prompt - Supports runtime overrides for key fields:
- positive text prompt
- mesh seed
- target face count
- file name prefix
- texture seed
- Waits for prompt completion by polling:
GET /queueGET /history/{prompt_id}
- Auto-downloads
.glboutput viaGET /view
- Python +
uv - ComfyUI server reachable from this machine
- A ComfyUI build with required nodes/models installed and running at
server_url, such as:michaelgold/comfy3d, or- another ComfyUI setup that includes qwen-image-2512 and Trellis2
cd /Users/mg/.openclaw/workspace/comfy-prompt-cli
uv sync
uv run comfy-prompt-cli config init --forceDefault config.json:
{
"server_url": "http://localhost:8188/"
}uv run comfy-prompt-cli healthuv run comfy-prompt-cli send path/to/prompt_api.jsonuv run comfy-prompt-cli send path/to/prompt_api.json \
--prompt "A 3d cartoon astronaut in a t-pose" \
--mesh-seed 12345 \
--target-face-num 800000 \
--filename-prefix astronaut \
--texture-seed 67890uv run comfy-prompt-cli wait <prompt_id> --out-dir downloadsuv run comfy-prompt-cli run path/to/prompt_api.json \
--prompt "A 3d cartoon astronaut in a t-pose" \
--mesh-seed 12345 \
--target-face-num 800000 \
--filename-prefix astronaut \
--texture-seed 67890 \
--out-dir downloadsuv run comfy-prompt-cli send path/to/prompt_api.json --dry-run# Submit
uv run comfy-prompt-cli send examples/qwen_to_trellis2_api---094ad7bb-e041-4d99-8768-50ebaf622e2e.json \
--prompt "A 3d cartoon astronaut in a t-pose" \
--mesh-seed 12345 \
--target-face-num 800000 \
--filename-prefix astronaut \
--texture-seed 67890
# Then wait + download
uv run comfy-prompt-cli wait <prompt_id> --out-dir downloadssend expects ComfyUI API prompt JSON.
Accepted:
- direct API prompt object (
{"node_id": {...}}), or - wrapper with top-level
promptkey ({"prompt": {...}})
Rejected:
- UI workflow export format with top-level
nodes+links
If you pass workflow export JSON, CLI will show a clear error telling you to export/copy API prompt JSON.
examples/qwen_to_trellis2---fc8244b7-d5d1-48ac-8913-1e8770cace7a.json
Workflow export example (expected to fail validation for/prompt)examples/qwen_to_trellis2_api---094ad7bb-e041-4d99-8768-50ebaf622e2e.json
API prompt example (valid for submission)
- Connection error: verify
config.jsonserver_url, host reachability, and ComfyUI port. - No GLB found: workflow may not output
.glb; check/history/{prompt_id}outputs. - Large GLB can’t be sent over Telegram: Telegram may reject with
413 Request Entity Too Large; use local path or reduce mesh/texture settings.