siliconflow-img-gen

Generate and edit PNG images from text prompts via the SiliconFlow Images API.

8.4k|1.4k|Updated Apr 24, 2024
One-click install
npx skills add https://github.com/TeamWiseFlow/wiseflow --skill siliconflow-img-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: siliconflow-img-gen
Source: https://github.com/TeamWiseFlow/wiseflow/tree/main/addons/officials/skills/siliconflow-img-gen
Command: npx skills add https://github.com/TeamWiseFlow/wiseflow --skill siliconflow-img-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It helps you turn prompts into usable images (or edit existing images) without manually dealing with image model APIs, while ensuring the outputs are validated.

Core Features & Use Cases

  • Text-to-image generation: Create images from a text prompt using a default Qwen image generation model, with a built-in fallback model when rate limits are hit.
  • Image-editing from sources: Modify one to three source images by combining them with your prompt, using the default Qwen image-edit model when you provide the image URL(s).
  • Local outputs + review flow: Downloads generated results to a timestamped output directory and produces prompts.json plus a simple index.html gallery for quick inspection; includes a required validation step to detect and retry abnormal “single-color” outputs.

Use case example: You need banner images for a product page—generate several prompt variations in text-to-image mode, then edit a selected image using a “make it look more like night mode” instruction while reviewing a gallery and re-trying any invalid generations.

Quick Start

Use the siliconflow-img-gen skill to generate an image by running the command: python3 {baseDir}/scripts/gen.py --prompt "a futuristic city at dusk".

Frequently Asked Questions about siliconflow-img-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images from text prompts using SiliconFlow?

To generate images from text prompts using SiliconFlow, you run a Python script with your prompt string. The Skill uses the default Qwen image generation model to render your text into a PNG output and automatically saves it to a local directory for review.

Can I edit existing images with a text prompt in SiliconFlow?

Yes, you can edit existing images in SiliconFlow by providing one to three source image URLs along with your text prompt. The Skill uses the Qwen image-edit model to modify the reference images based on your instructions and outputs the resulting PNG file.

Do I need an API key to use the SiliconFlow image generation script?

Yes, you must set the SILICONFLOW_API_KEY environment variable before using the image generation script. This key is required to authenticate your requests to the SiliconFlow Images API endpoint for rendering your prompts into PNG outputs.

What happens if the image generation returns a blank or single-color output?

If the image generation returns a blank or single-color output, the Skill automatically detects this invalid result and retries the rendering up to three times. This validation step ensures you receive a properly generated PNG image for your marketing visuals or creative workflows.

How does the Skill handle rate limits during prompt-to-image conversion?

When the prompt-to-image conversion hits rate limits on the default Qwen model, the Skill automatically falls back to a secondary image generation model. This ensures your text prompts are still processed and output as PNG files without interrupting your creative workflow.

How are generated images saved for review after processing?

Generated images are downloaded to a timestamped output directory on your local system. The Skill also produces a prompts.json file and a simple index.html gallery, allowing you to quickly inspect and review the PNG outputs and their corresponding text prompts.