ModelScope Image Generation for Openclaw

A versatile AI image generation tool that leverages the ModelScope ecosystem for high-quality text-to-image and image-to-image transformations via Openclaw Skills.

windandliberty
v1.2.0
Apr 7, 2026
1
771
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install modelscope-img-generator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install modelscope-img-generator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ModelScope Image Generation?

This skill enables AI agents to create or modify visual content using the extensive library of ModelScope community models. By integrating with Openclaw Skills, developers and creators can automate visual workflows, ranging from simple prompt-based generation to complex image editing tasks. The tool is designed with a security-first approach, connecting exclusively to the official ModelScope API endpoint to ensure that data and API keys remain protected while providing access to state-of-the-art models like Tongyi-MAI/Z-Image-Turbo.

ModelScope Image Generation Use Cases

  • Generate high-quality marketing visuals and assets from simple text descriptions.
  • Modify existing photographs by adding or removing specific elements through natural language instructions.
  • Create stylized artwork using specialized community models such as Chinese-style ink paintings.
  • Apply LoRA adapters to achieve consistent character or aesthetic styles across multiple generated images.
  • Automate batch image production within a local development environment using Openclaw Skills commands.

How ModelScope Image Generation Works

  1. The user provides a descriptive prompt or an existing image path to the agent using Openclaw Skills.
  2. The skill performs a preflight check to ensure the ModelScope API key and the uv package manager are correctly configured.
  3. The Python-based generator script processes the input parameters, including optional model selection and LoRA weights.
  4. A request is sent to the fixed ModelScope inference endpoint to process the text or image-to-image task.
  5. The resulting image is saved to the user's current working directory with a standardized, timestamped filename.
  6. The script returns the final file path to the agent, completing the visual generation lifecycle.

ModelScope Image Generation Setup

To get started with this skill in your Openclaw Skills environment, follow these steps:

  1. API Key: Obtain your key from the ModelScope website and set it as an environment variable:
export MODELSCOPE_API_KEY="your-key-here"
  1. Dependencies: Ensure you have Python 3.10+ and the uv package manager installed:
pip install uv
  1. Basic Execution: Use the following command structure to generate your first image:
uv run ~/.codex/skills/ModelScope_img_generator/scripts/generate_img.py --prompt "A serene Japanese garden" --filename "garden.jpg"

ModelScope Image Generation Data Schema & Taxonomy

The skill follows a strict data organization pattern to ensure compatibility within the Openclaw Skills ecosystem:

Parameter Requirement Description
--prompt Required The text-based description for generation or editing.
--filename Required Standardized format: yyyy-mm-dd-hh-mm-ss-name.jpg.
--input-image Optional Path to a local image file for image-to-image tasks.
--model Optional Specifies a specific model ID from the ModelScope Hub.
--lora Optional Repository ID or weighted list (e.g., lora1:0.6,lora2:0.4).

ModelScope Image Generation Advanced Features

  • Support for weighted multi-LoRA adapters to blend different artistic styles with precision.
  • Seamless image-to-image editing capabilities allowing for complex modifications to existing files.
  • Automatic timestamped filename generation to maintain an organized local image library.
  • Flexible model selection enabling access to thousands of community-contributed models via Openclaw Skills.
  • Built-in error handling for common API failures, ensuring a robust developer experience.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*