Stable Diffusion Image Generation API
Paste the following prompt into your AI chat to install this skill:
Please install @user_8c8358bf/stable-diffusion-skill according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Stable Diffusion workflows often require manually starting WebUI, copying prompts, tuning parameters, and post-processing images, which makes the process hard to reuse in agent or script pipelines. Stable Diffusion Image Generation API wraps the local SD WebUI --api surface into a command-line interface, allowing automated flows from status checks and model listing to image generation.
How It Works
The skill centers on sd_client.py. It first checks whether http://127.0.0.1:7860 or SD_WEBUI_URL is reachable via status, then inspects available checkpoints with list-models. Its core capabilities include:
- Text-to-image: txt2img handles positive prompts, negative prompts, --steps, --cfg-scale, sampler, dimensions, and seed.
- Image-to-image: img2img uses denoising-strength to control how much of the source image is preserved.
- Inpainting: inpaint with mask-fill modes edits specific regions.
- ControlNet: supports modules such as openpose, canny, depth, and lineart for structural control.
- Upscaling and model management: invokes algorithms such as R-ESRGAN or SwinIR, switches checkpoints, or applies LoRA syntax.
prompt_helper.py maps Chinese descriptions to common Stable Diffusion English style terms, such as photorealistic, anime, oil painting, cyberpunk, and traditional Chinese art.
Boundaries
The skill does not bundle Stable Diffusion model code and does not deploy WebUI itself; a local or remote AUTOMATIC1111 SD WebUI must already be running with --api enabled. Output quality depends on the model, VRAM, resolution, --steps, sampler, and ControlNet weights. Remote usage also requires attention to timeout, cross-origin access, and port reachability.
Use Cases
- When SD WebUI runs locally, convert Chinese descriptions into Stable Diffusion prompts and batch-generate anime-style variants.
- Use img2img and denoising-strength to restyle product photos into oil-painting, cyberpunk, or traditional Chinese aesthetics.
- Lock pose or line-art structure with ControlNet modules such as openpose or lineart before generating the final image.
- Generate a low-resolution base image, upscale it with R-ESRGAN or SwinIR, and compare results across checkpoints.
Best For
- Generative AI engineers debugging local SD WebUI: need a unified CLI to tune txt2img and img2img parameters.
- Designers producing concept art and visual drafts: need reference-image restyling, inpainting, and ControlNet composition control.
- Independent developers building automated image pipelines: need API status checks, model listing, batch generation, and upscaling.
- Campaign asset creators: need to convert Chinese copy into prompts quickly and generate multiple variants for selection.
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.