← 返回
未分类 Key

liblib-comfy-fusion

Generate product background fusion images via LiblibAI ComfyUI app API using signed AccessKey/SecretKey requests. Use when user asks for Liblib Comfy app generation, Feishu image + fusion, local or URL image input, task polling with generateUuid, or Feishu message URL extraction.
user_7eb79720
未分类 community v1.0.1 2 版本 100000 Key: 需要
★ 0
Stars
📥 265
下载
💾 20
安装
2
版本
#latest

概述

Liblib Comfy Fusion Generation

Generate images with LiblibAI ComfyUI App API (template-based workflow). Supports public image URL or local file.

For local files from Feishu, the recommended flow is:

1) upload the local file to R2 (S3-compatible) to get a public URL

2) use that public URL as the Liblib LoadImage input

3) return the Liblib result imageUrl as MEDIA:https://... so Feishu displays it directly

Prerequisites

Environment variables must be set:

  • LIB_ACCESS_KEY — API access key
  • LIB_SECRET_KEY — API secret key

Usage

Run the CLI at scripts/liblib_client.py:

# Public URL input
python3 scripts/liblib_client.py run --image-url "https://example.com/input.jpg"

# Local file (Feishu inbound attachment) → upload to R2 → use public URL
python3 scripts/liblib_client.py run --local-image "/path/to/input.png" --basename "product-fusion"

# Local file (advanced): embed as data URI (only if Liblib accepts it)
python3 scripts/liblib_client.py run --local-image "/path/to/input.png" --local-image-mode data-uri

# Parse URL from Feishu message text
python3 scripts/liblib_client.py run --feishu-text "请处理这个图 https://example.com/input.jpg"

# Submit only (no poll)
python3 scripts/liblib_client.py run --local-image "./input.jpg" --no-poll

# Query task status
python3 scripts/liblib_client.py status <generateUuid>

Output and Feishu 回传

  • After a successful run (generateStatus=5), the script downloads images[].imageUrl into workspace/outputs/images/YYYY-MM-DD/.(png|jpg|...) (override with --output-dir).
  • stdout prints a single line: MEDIA:./outputs/images/YYYY-MM-DD/ (relative to workspace/). Use this with OpenClaw Feishu channel so the image appears in the current chat without extra API calls.
  • Full task JSON is printed to stderr for debugging.
  • If MEDIA: is not supported in your channel, use feishu-uploader with --receive-id-type chat_id and the group chat_id, or --open-id for DM.

Parameters (run)

FlagMeaning
--------------
--local-imageLocal path; takes priority over URL. Default mode uploads to R2 and uses public URL.
--local-image-moder2 (default) or data-uri.
--image-urlPublic URL the Liblib servers can fetch.
--feishu-text / FEISHU_TEXTExtract first http(s) URL from text.
--output-dirDefault: /outputs/images.
--basenameFilename stem (default liblib-fusion).
--no-downloadSkip downloading result files.
--no-print-mediaDo not print MEDIA: line; stdout prints absolute path of first saved file instead.

API Details

  • Submit endpoint: POST /api/generate/comfyui/app
  • Status endpoint: POST /api/generate/comfy/status
  • Auth query params: AccessKey, Signature, Timestamp, SignatureNonce
  • Signature algorithm:
  • content = uriPath & Timestamp & SignatureNonce
  • HMAC-SHA1(secretKey, content)
  • URL-safe Base64 without trailing =

Async Pattern

  1. Submit task to get generateUuid
  2. Poll status endpoint until generateStatus is 5 (success) or 6 (failed)
  3. Read images[].imageUrl when successful

Notes

  • URL input: must be publicly reachable by Liblib.
  • Local input: default uses R2 upload to produce a public URL. Requires boto3.
  • Returned image URLs are temporary (typically ~7 days).
  • If API returns content review errors, try a different source image or URL.

版本历史

共 2 个版本

  • v1.0.1 Initial release 当前
    2026-04-09 17:06 安全 安全
  • v1.0.0 Initial release
    2026-04-07 18:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 218 📥 48,003
design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 134 📥 52,989
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 331 📥 94,122