π¦ ClawHub
modelscope_img_generator
by @windandliberty
Generate images with ModelScope API. Use for image generation requests. Supports text-to-image + image-to-image; configurable models; use --input-image.
π‘ Examples
Generate new image:
uv run ~/.codex/skills/ModelScope_img_generator/scripts/generate_img.py --prompt "A serene Japanese garden with cherry blossoms" --filename "2025-11-23-14-23-05-japanese-garden.jpg"
Generate with specific model:
uv run ~/.codex/skills/ModelScope_img_generator/scripts/generate_img.py --prompt "Chinese ink painting landscape" --filename "ink-landscape.jpg" --model "MusePublic/wukong-1.8B"
Edit existing image:
uv run ~/.codex/skills/ModelScope_img_generator/scripts/generate_img.py --prompt "make the sky more dramatic with storm clouds" --filename "2025-11-23-14-25-30-dramatic-sky.jpg" --input-image "original-photo.jpg"
Generate with LoRA:
uv run ~/.codex/skills/ModelScope_img_generator/scripts/generate_img.py --prompt "anime style portrait" --filename "anime-portrait.jpg" --lora "anime-lora:0.8"
βοΈ Configuration
Required before use:
1. ModelScope API Key - Get from https://modelscope.cn
- Set as environment variable: export MODELSCOPE_API_KEY="your-key-here"
- Or pass directly: --api-key "your-key-here"
2. uv - Python package manager (install via pip install uv)
3. Python 3.10+ - Required runtime
Python dependencies (auto-installed by uv):
TERMINAL
clawhub install modelscope-img-generator