Generate Image
generate_imageGenerate images from text prompts using ModelScope AI models. Supports text-to-image and image-to-image, with an optional source image for transformation.
Instructions
Generate an image based on the given text prompt and ModelScope AIGC model ID.
Supports both text-to-image and image-to-image generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | The model's ID to be used for image generation. If not provided, the default model for the corresponding generation type (text-to-image or image-to-image) is used. | |
| prompt | Yes | The prompt of the image to be generated, containing the desired elements and visual features. | |
| image_url | No | The URL of the source image for image-to-image generation.If not provided, performs text-to-image generation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of image generation | |
| model | Yes | Model used for image generation | |
| image_url | Yes | URL of the generated image |