Liblib Comfy Fusion Generation
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_7eb79720/liblib-comfy-fusion.
About this skill
Problem
liblib-comfy-fusion addresses a common Feishu integration gap: a user provides a local image, a group-chat text excerpt, or a public image URL and expects the skill to run a LiblibAI ComfyUI template workflow, then display the generated image back in the current chat. Without this skill, teams often have to upload local files, construct signed requests, poll task status, and manually download temporary image URLs before sending files through another channel. Those steps can fail when URLs are not public, signatures are malformed, or the chat channel does not render media directly.
How It Works
The skill uses scripts/liblib_client.py to call the LiblibAI ComfyUI App API. The core flow is:
- Input handling: accepts a public URL via --image-url, a local file via --local-image, or the first http(s) URL from --feishu-text / FEISHU_TEXT. Local files are uploaded to R2/S3-compatible storage by default so Liblib can fetch a public URL.
- Async generation: submits a task to POST /api/generate/comfyui/app, authenticates with AccessKey, Signature, Timestamp, and SignatureNonce, then polls POST /api/generate/comfy/status until generateStatus is 5 for success or 6 for failure.
- Result delivery: on success, downloads images[].imageUrl into workspace/outputs/images/YYYY-MM-DD/ and prints MEDIA:... to stdout for Feishu display; the full task JSON goes to stderr for debugging.
Boundaries And Notes
- Liblib must be able to reach image URLs over the public internet; private or internal URLs usually will not work.
- Local-file mode relies on
boto3and R2/S3 upload by default; usedata-urimode or provide a public URL when that stack is unavailable. - Returned image URLs are temporary, typically valid for about 7 days, so they are not suitable for long-term storage.
- If the API returns content-review errors, changing the source image or URL is usually more practical than resubmitting the same request.
Use Cases
- When a local product image arrives in a Feishu chat, upload it to R2, generate a public URL, and call a Liblib ComfyUI template to reply with the design.
- Extract the first public image URL from Feishu message text, submit a Liblib ComfyUI App task, and poll its status until success or failure.
- Debug ComfyUI App API calls by inspecting the full task JSON in stderr, verifying signatures, polling results, and `MEDIA:` stdout output.
- Upload local images that need S3-compatible storage to R2 first, then use the resulting public URL as the Liblib `LoadImage` workflow input.
Best For
- Feishu bot developers who need to connect local images to Liblib generation and display results directly in group chats.
- Multimodal workflow engineers who need to call the Liblib ComfyUI App API and handle signatures, async polling, and temporary image URLs.
- Design tool integration owners who need to convert local files into public URLs before submitting ComfyUI template workflows.
- Automation operations engineers who need to troubleshoot failed generation tasks, content-review errors, or S3 upload dependencies.
Related Skills
A ComfyUI image-generation skill that uses a five-step dialog to collect prompts, prefill templates, confirm parameters, submit API jobs, and return results.
A design-system guidance skill for Impeccable that produces token-based rules, component states, accessibility criteria, and QA checklists.
Director-level video lapian that diagnoses material precision, then produces frame evidence, director analysis, a style bible, and a showcase video.
Plan and brief Amazon MAIN, Listing, and A+ image sets from verified product facts, then return plan and image QA status.