by jinhaow · v0.0.1
A relatively universal modelscope API-Inference plugin for text-to-image and image-to-image, which can call most of the modelscope AIGC models.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
A Dify plugin based on ModelScope API‑Inference, providing text‑to‑image and image‑to‑image capabilities. It supports calling most AIGC models available on the ModelScope platform.
Tongyi-MAI/Z-Image-Turbo、MusePublic/489_ckpt_FLUX_1、Qwen/Qwen-Image-2512, and many others from the ModelScope AIGC collection.You need a ModelScope API Key before using this plugin:
ms-xxxxxx)
Add the plugin to Dify’s plugin directory or install it via Dify’s plugin management interface.
Enter your ModelScope API Key in the plugin’s credential settings.
If you use the image‑to‑image tool, you must set the following environment variable in Dify’s .env file to allow the plugin to access uploaded image files:
INTERNAL_FILES_URL=http://api:5001
This is required for internal container communication. Without it, the image‑to‑image tool may fail to retrieve the input image.
model: "Tongyi-MAI/Z-Image-Turbo"
prompt: "a cute cat on sofa"
aspect_ratio: "16:9"
resolution: 1080
model: "MusePublic/489_ckpt_FLUX_1"
prompt: Turn this picture into an anime style, keeping the content and composition unchanged."
image: [上传的图像文件]
aspect_ratio: "original"
resolution: 1080
loras: "liurui20111959/Ghibli_Style_2"
The plugin is written in Python and follows this structure:
ms-image/
├── manifest.yaml # Plugin metadata
├── main.py # Plugin startup entry
├── provider/
│ ├── ms-image.yaml # Provider configuration
│ └── ms-image.py # Provider main logic
├── tools/
│ ├── text2image.yaml # Text‑to‑image tool definition
│ ├── text2image.py # Text‑to‑image implementation
│ ├── image2image.yaml # Image‑to‑image tool definition
│ └── image2image.py # Image‑to‑image implementation
└── icon.svg # Plugin icon
The plugin entry point is main, defined in provider/ms-image.py.
INTERNAL_FILES_URL environment variable is correctly set.Current version: 0.0.1