npx skills add smithery/neversight --skill modelscope-zimage-generator
haiyuan-ai/agent-skills · Archived
modelscope-zimage-generator
Generate images with ModelScope Z-Image models. Use for image generation, artwork, cover images, and LoRA-based variants. Supports async polling.
Installation
npx skills add haiyuan-ai/agent-skills --skill modelscope-zimage-generator
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Web search for current or external info. Trigger: search verbs ("search", "查", "搜", "google"…
56 installs分析文本中的 AI 风格信号、误判风险和自然化改写方向。支持文本或 URL 输入。触发词:AI 味/去 AI 味…
53 installsConvert between Markdown, Word (.docx), HTML, and PDF via pandoc with CJK support. Trigger on: …
13 installsOperate an Obsidian vault via the official CLI for note, search, task, and metadata workflows. …
12 installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Helps users discover and install agent skills when they ask questions like "how do I do X", "fi…
3.3M installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Te…
568.3K installsAlso in this package
Other skills from haiyuan-ai/agent-skills.
npx skills add haiyuan-ai/agent-skills
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md3,407 B -
docs
README.md3,996 B -
docs
SUMMARY.md180 B
History
- First seen on skills.sh
- First recorded snapshot · 71 installs
SKILL.md
ModelScope Z-Image Generator Skill
Generate images using ModelScope's Z-Image series models with async polling flow.
When to Use This Skill
Use this skill when the user asks to:
- generate an image or illustration
- create artwork or a cover image
- use ModelScope Z-Image or Z-Image-Turbo explicitly
- generate multiple image variants
- apply a LoRA during generation
Common trigger phrases:
- English:
generate an image,create artwork,make a cover,use Z-Image - Chinese:
生成图片,画一张图,创建封面图,用 Z-Image
Core Workflow
1. Parse the Request
Identify the generation mode:
- text-to-image
- LoRA-assisted generation
- multi-image or batch generation
2. Choose the Model
Select the model based on the user's request:
- explicit
Z-Image-Turbo->Tongyi-MAI/Z-Image-Turbo - explicit
Z-Image->Tongyi-MAI/Z-Image - default ->
Tongyi-MAI/Z-Image-Turbo
3. Run the Generator Script
cd /path/to/modelscope-zimage-generator
python scripts/generate_image.py "prompt" output.jpg
4. Return the Result
Tell the user what happened:
- success: return the output path
- failure: explain the error clearly
Prerequisites
Before running:
- ModelScope API key: obtain it from
https://modelscope.cn/my/myaccesstoken - Python environment: requires
requestsandPIL - Valid script path: make sure
generate_image.pyexists
Quick Command Mapping
| User Request | Command |
|---|---|
| "Generate image" | python scripts/generate_image.py "prompt" output.jpg |
| "Use Z-Image" | python scripts/generate_image.py "prompt" output.jpg --model "Tongyi-MAI/Z-Image" |
| "With LoRA" | python scripts/generate_image.py "prompt" output.jpg --lora "lora-id" |
Common Workflows
Text-to-Image
python scripts/generate_image.py "A golden cat in sunset" golden_cat.jpg
Specify Model
python scripts/generate_image.py "A cat" output.jpg --model "Tongyi-MAI/Z-Image"
With LoRA
# Single LoRA
python scripts/generate_image.py "A cat" output.jpg --lora "liuhaotian/llava-lora"
# Multiple LoRAs (weights sum to 1.0)
python scripts/generate_image.py "A cat" output.jpg --loras '{"lora1": 0.6, "lora2": 0.4}'
Batch Generation
# Generate multiple images in parallel
python scripts/generate_image.py "A cat" cat1.jpg &
python scripts/generate_image.py "A dog" dog1.jpg &
wait
Resources
Read references only when needed:
references/api-reference.md- API 完整参数references/lora-config.md- LoRA 配置指南references/troubleshooting.md- 故障排查
Troubleshooting
API Key Not Found
# Option 1: Environment variable
export MODELSCOPE_API_KEY="ms-your-key"
# Option 2: Config file
mkdir -p ~/.config/modelscope
cat > ~/.config/modelscope/config.json << EOF
{"api_key": "ms-your-key"}
EOF
Task Timeout
- Default timeout is 5 minutes (60 polling attempts)
- Increase polling attempts or inspect the task status
LoRA Not Working
- Check whether the LoRA ID is valid
- Make sure multiple LoRA weights sum to
1.0 - Do not use
--loraand--lorastogether