modelscope.cn

sophnet-image-generate

Use when a user requests Sophnet text-to-image generation, needs model selection across Z-Image-Turbo/Qwen-Image/Qwen-Image-Plus, or reports polling/output issues such as missing IMAGE_URL or PREVIEW_PATH.

Installation

$ npx skills add https://modelscope.cn

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
short-description
Generate Sophnet images with stable polling outputs

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,918 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Sophnet Image Generate

Overview

Generate Sophnet images with Python scripts that handle task polling and structured output.

Script responsibilities:

  • generateimage.py: core API caller and polling loop, outputs machine-friendly TASKID, STATUS, and IMAGE_URL.
  • generateandpreview.sh: wrapper for local use, calls generateimage.py, downloads first image, adds PREVIEWPATH.

When to Use

  • User asks to generate an image with Sophnet models.
  • Caller needs stable outputs like TASKID, STATUS, IMAGEURL, PREVIEW_PATH.
  • Prompt includes model choice (Z-Image-Turbo, Qwen-Image, Qwen-Image-Plus).
  • Do not use when the task is only to display an existing image URL/path; use sophnet-smart-image-loader.

Quick Reference

Goal Command
Generate + local preview path bash {baseDir}/scripts/generateandpreview.sh --prompt "..."
Generate URLs only uv run --project {baseDir} python {baseDir}/scripts/generate_image.py --prompt "..."
Show script options uv run --project {baseDir} python {baseDir}/scripts/generate_image.py --help

Recommended defaults:

  • Use generateandpreview.sh for interactive local image preview.
  • Use generate_image.py for automation/CI or when download is not needed.

Implementation

  1. Run the script with --prompt.
  2. Parse output lines by key prefix.
  3. Use IMAGEURL to share with users (publicly accessible). Use PREVIEWPATH for local image preview when present.

Common Mistakes

  • Assuming PREVIEWPATH exists when using generateimage.py.