Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
19650f6
feat: initial external model support
CypherNaught-0x Feb 4, 2026
74ecc46
feat: support reference images for external models
CypherNaught-0x Feb 17, 2026
a9d3b4e
fix: sorting lint error
CypherNaught-0x Feb 17, 2026
1b43769
chore: hide Reidentify button for external models
CypherNaught-0x Feb 27, 2026
5d34eab
review: enable auto-install/remove fro external models
CypherNaught-0x Feb 27, 2026
6fe1a6f
feat: show external mode name during install
CypherNaught-0x Feb 27, 2026
d5a6283
review: model descriptions
CypherNaught-0x Feb 27, 2026
0dd7283
review: implemented review comments
CypherNaught-0x Feb 27, 2026
dc665e0
review: added optional seed control for external models
CypherNaught-0x Feb 27, 2026
c6b0d45
chore: fix linter warning
CypherNaught-0x Feb 27, 2026
b91a156
review: save api keys to a seperate file
CypherNaught-0x Feb 27, 2026
3620541
docs: updated external model docs
CypherNaught-0x Feb 27, 2026
10729f4
chore: fix linter errors
CypherNaught-0x Feb 27, 2026
689725c
Merge branch 'main' into external-models
Pfannkuchensack Mar 7, 2026
f39456e
Merge branch 'main' into external-models
Pfannkuchensack Mar 12, 2026
519575e
fix: sync configured external starter models on startup
CypherNaught-0x Mar 17, 2026
757bd3d
feat(ui): add provider-specific external generation nodes
CypherNaught-0x Mar 17, 2026
bafce41
feat: expose external panel schemas in model configs
CypherNaught-0x Mar 17, 2026
257994f
feat(ui): drive external panels from panel schema
CypherNaught-0x Mar 17, 2026
c3a482e
docs: sync app config docstring order
CypherNaught-0x Mar 17, 2026
40f02aa
feat: add gemini 3.1 flash image preview starter model
CypherNaught-0x Mar 17, 2026
20a400c
feat: update gemini image model limits
CypherNaught-0x Mar 17, 2026
9e4d0bb
fix: resolve TypeScript errors and move external provider config to a…
Pfannkuchensack Mar 18, 2026
8375f95
feat: add resolution presets and imageConfig support for Gemini 3 models
Pfannkuchensack Mar 19, 2026
d8d0ebc
Remove unused external model fields and add provider-specific parameters
Pfannkuchensack Mar 20, 2026
a1eef79
feat: add Alibaba Cloud DashScope external image generation provider
Pfannkuchensack Mar 20, 2026
27fc650
Merge branch 'main' into external-models
Pfannkuchensack Mar 23, 2026
edde0b4
Merge branch 'main' into external-models
Pfannkuchensack Mar 28, 2026
18315db
Chore Ruff check & format
Pfannkuchensack Mar 28, 2026
813a5e2
Chore typegen
Pfannkuchensack Mar 28, 2026
c2016bc
feat: full canvas workflow integration for external models
Pfannkuchensack Apr 6, 2026
4cbd60b
Merge remote-tracking branch 'upstream/main' into external-models
Pfannkuchensack Apr 6, 2026
089e2db
Chore typegen Linux seperator
Pfannkuchensack Apr 6, 2026
3e9e052
feat: full canvas workflow integration for external models
Pfannkuchensack Apr 6, 2026
853c3ef
Merge remote-tracking branch 'upstream/main' into external-models
Pfannkuchensack Apr 7, 2026
17157d7
Merge remote-tracking branch 'upstream/main' into external-models
Pfannkuchensack Apr 12, 2026
ec90b2f
Merge remote-tracking branch 'upstream/main' into external-models
Pfannkuchensack Apr 12, 2026
5c09c82
Merge remote-tracking branch 'upstream/main' into external-models
Pfannkuchensack Apr 13, 2026
8f00759
Chore pnpm fix
Pfannkuchensack Apr 13, 2026
ec4b87b
add missing parameter
Pfannkuchensack Apr 13, 2026
cd88865
Merge branch 'main' into external-models
Pfannkuchensack Apr 14, 2026
c743106
Merge remote-tracking branch 'upstream/main' into external-models
Pfannkuchensack Apr 14, 2026
450ba7b
Merge branch 'main' into external-models
Pfannkuchensack Apr 14, 2026
7938d84
Merge branch 'external-models' into alibabacloud/dashscope
Pfannkuchensack Apr 14, 2026
b739af1
docs: add External Models guide with Gemini and OpenAI provider pages
Pfannkuchensack Apr 14, 2026
3d19b83
Merge branch 'external-models' into alibabacloud/dashscope
Pfannkuchensack Apr 14, 2026
872b70f
docs: add Alibaba Cloud DashScope provider page to External Models guide
Pfannkuchensack Apr 14, 2026
d42cc67
chore: ruff format alibabacloud provider
Pfannkuchensack Apr 14, 2026
66f35dd
chore(frontend): regenerate schema.ts to include Alibaba Cloud DashSc…
Pfannkuchensack Apr 14, 2026
a2077fa
fix: update InvokeAIAppConfig docstring with Alibaba Cloud DashScope …
Pfannkuchensack Apr 14, 2026
aebff3b
chore(frontend): regenerate schema.ts after docstring update
Pfannkuchensack Apr 14, 2026
73b15a2
fix(external-models): address PR review feedback
Pfannkuchensack Apr 15, 2026
7330a70
Merge branch 'external-models' into alibabacloud/dashscope
Pfannkuchensack Apr 15, 2026
887f110
feat: add AlibabaCloudImageGenerationInvocation node for DashScope pr…
Pfannkuchensack Apr 15, 2026
20254f3
fix(external-models): resolve TSC errors in metadata parsing and exte…
Pfannkuchensack Apr 15, 2026
844632f
chore: prettier format ModelIdentifierFieldInputComponent
Pfannkuchensack Apr 15, 2026
6136e2b
Merge branch 'external-models' into alibabacloud/dashscope
Pfannkuchensack Apr 15, 2026
f7aed80
Merge remote-tracking branch 'upstream/main' into alibabacloud/dashscope
Pfannkuchensack Apr 22, 2026
13e8910
Chore Fix typegen
Pfannkuchensack Apr 22, 2026
7f4d704
Chore Docs
Pfannkuchensack Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions docs/features/external-models/alibabacloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Alibaba Cloud DashScope
---

# :material-cloud-outline: Alibaba Cloud DashScope

Invoke supports Alibaba Cloud's **DashScope** image generation service, giving access to the **Qwen Image** family and **Wan 2.6** text-to-image. Qwen Image is particularly strong at bilingual (Chinese / English) text rendering.

## Getting an API Key

1. Sign in to [Alibaba Cloud Model Studio](https://www.alibabacloud.com/en/product/modelstudio) (the international DashScope portal).
2. Enable **DashScope** and activate the image generation models you plan to use.
3. Create an API key from the **API Keys** section of the console.

## Configuration

Add your key to `api_keys.yaml` in your Invoke root directory:

```yaml
external_alibabacloud_api_key: "your-dashscope-api-key"

# Optional — default is the international endpoint. Use the China endpoint if your account lives there:
# https://dashscope.aliyuncs.com
external_alibabacloud_base_url: "https://dashscope-intl.aliyuncs.com"
```

Restart Invoke for the change to take effect.

!!! info "International vs. China endpoints"
DashScope has separate international (`dashscope-intl.aliyuncs.com`) and China (`dashscope.aliyuncs.com`) deployments. Your API key only works on the deployment it was issued on — if you get authentication errors, check that `external_alibabacloud_base_url` matches.

## Available Models

| Model | Modes | Aspect Ratios | Batch | Notes |
| --- | --- | --- | --- | --- |
| **Qwen Image 2.0 Pro** | txt2img | 1:1, 4:3, 3:4, 16:9, 9:16 | up to 4 | Best quality, 2K output, excellent bilingual text. |
| **Qwen Image 2.0** | txt2img | 1:1, 4:3, 3:4, 16:9, 9:16 | up to 4 | Faster / cheaper 2K sibling of 2.0 Pro. |
| **Qwen Image Max** | txt2img | 1:1, 4:3, 3:4, 16:9, 9:16 | up to 4 | High quality at ~1.3K native size. |
| **Qwen Image Edit Max** | img2img | 1:1, 4:3, 3:4, 16:9, 9:16 | up to 4 | Image editing with industrial / geometric reasoning. |
| **Wan 2.6 Text-to-Image** | txt2img | 1:1, 4:3, 3:4, 16:9, 9:16 | up to 4 | Photorealistic T2I at 1K. |

All models support **negative prompt** and **seed**.

## Tips

- **Bilingual prompts.** Qwen Image is unusually good at rendering Chinese text and mixed-language prompts — it's a strong choice when your prompt or desired output contains non-Latin script.
- **Editing** is only supported by Qwen Image Edit Max. Use it for image-to-image workflows; the other Qwen Image models are text-to-image only.
- **Batching** is capped at 4 images per request. Larger batches are split across multiple API calls.
- **Costs** vary per model — Qwen Image 2.0 Pro is the most expensive, Qwen Image 2.0 the cheapest of the 2.0 family. Check Alibaba Cloud's pricing page before running large batches.
22 changes: 22 additions & 0 deletions docs/src/generated/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,28 @@
"type": "<class 'bool'>",
"validation": {}
},
{
"category": "EXTERNAL PROVIDERS",
"default": null,
"description": "API key for Alibaba Cloud DashScope image generation.",
"env_var": "INVOKEAI_EXTERNAL_ALIBABACLOUD_API_KEY",
"literal_values": [],
"name": "external_alibabacloud_api_key",
"required": false,
"type": "typing.Optional[str]",
"validation": {}
},
{
"category": "EXTERNAL PROVIDERS",
"default": null,
"description": "Base URL override for Alibaba Cloud DashScope image generation.",
"env_var": "INVOKEAI_EXTERNAL_ALIBABACLOUD_BASE_URL",
"literal_values": [],
"name": "external_alibabacloud_base_url",
"required": false,
"type": "typing.Optional[str]",
"validation": {}
},
{
"category": "EXTERNAL PROVIDERS",
"default": null,
Expand Down
3 changes: 2 additions & 1 deletion invokeai/app/api/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from invokeai.app.services.download.download_default import DownloadQueueService
from invokeai.app.services.events.events_fastapievents import FastAPIEventService
from invokeai.app.services.external_generation.external_generation_default import ExternalGenerationService
from invokeai.app.services.external_generation.providers import GeminiProvider, OpenAIProvider
from invokeai.app.services.external_generation.providers import AlibabaCloudProvider, GeminiProvider, OpenAIProvider
from invokeai.app.services.external_generation.startup import sync_configured_external_starter_models
from invokeai.app.services.image_files.image_files_disk import DiskImageFileStorage
from invokeai.app.services.image_records.image_records_sqlite import SqliteImageRecordStorage
Expand Down Expand Up @@ -161,6 +161,7 @@ def initialize(
)
external_generation = ExternalGenerationService(
providers={
AlibabaCloudProvider.provider_id: AlibabaCloudProvider(app_config=configuration, logger=logger),
GeminiProvider.provider_id: GeminiProvider(app_config=configuration, logger=logger),
OpenAIProvider.provider_id: OpenAIProvider(app_config=configuration, logger=logger),
},
Expand Down
1 change: 1 addition & 0 deletions invokeai/app/api/routers/app_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class ExternalProviderConfigModel(BaseModel):


EXTERNAL_PROVIDER_FIELDS: dict[str, tuple[str, str]] = {
"alibabacloud": ("external_alibabacloud_api_key", "external_alibabacloud_base_url"),
"gemini": ("external_gemini_api_key", "external_gemini_base_url"),
"openai": ("external_openai_api_key", "external_openai_base_url"),
}
Expand Down
28 changes: 28 additions & 0 deletions invokeai/app/invocations/external_image_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,43 @@ class GeminiImageGenerationInvocation(BaseExternalImageGenerationInvocation):
mask_image: ImageField | None = InputField(default=None, description="Mask image for inpaint", ui_hidden=True)

temperature: float | None = InputField(default=None, ge=0.0, le=2.0, description="Sampling temperature")
thinking_level: Literal["minimal", "high"] | None = InputField(
default=None, description="Thinking level for image generation"
)

def _build_provider_options(self) -> dict[str, Any] | None:
options: dict[str, Any] = {}
if self.temperature is not None:
options["temperature"] = self.temperature
if self.thinking_level is not None:
options["thinking_level"] = self.thinking_level
return options or None

def _build_output_provider_metadata(self) -> dict[str, Any]:
metadata: dict[str, Any] = {}
if self.temperature is not None:
metadata["gemini_temperature"] = self.temperature
if self.thinking_level is not None:
metadata["gemini_thinking_level"] = self.thinking_level
return metadata


@invocation(
"alibabacloud_image_generation",
title="Alibaba Cloud DashScope Image Generation",
tags=["external", "generation", "alibabacloud", "dashscope"],
category="image",
version="1.0.0",
)
class AlibabaCloudImageGenerationInvocation(BaseExternalImageGenerationInvocation):
"""Generate images using an Alibaba Cloud DashScope external model."""

provider_id = "alibabacloud"

model: ModelIdentifierField = InputField(
description=FieldDescriptions.main_model,
ui_model_base=[BaseModelType.External],
ui_model_type=[ModelType.ExternalImageGenerator],
ui_model_format=[ModelFormat.ExternalApi],
ui_model_provider_id=["alibabacloud"],
)
10 changes: 9 additions & 1 deletion invokeai/app/services/config/config_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
LOG_LEVEL = Literal["debug", "info", "warning", "error", "critical"]
CONFIG_SCHEMA_VERSION = "4.0.2"
EXTERNAL_PROVIDER_CONFIG_FIELDS = (
"external_alibabacloud_api_key",
"external_alibabacloud_base_url",
"external_gemini_api_key",
"external_openai_api_key",
"external_gemini_base_url",
"external_openai_api_key",
"external_openai_base_url",
)

Expand Down Expand Up @@ -120,6 +122,8 @@ class InvokeAIAppConfig(BaseSettings):
allow_unknown_models: Allow installation of models that we are unable to identify. If enabled, models will be marked as `unknown` in the database, and will not have any metadata associated with them. If disabled, unknown models will be rejected during installation.
multiuser: Enable multiuser support. When disabled, the application runs in single-user mode using a default system account with administrator privileges. When enabled, requires user authentication and authorization.
strict_password_checking: Enforce strict password requirements. When True, passwords must contain uppercase, lowercase, and numbers. When False (default), any password is accepted but its strength (weak/moderate/strong) is reported to the user.
external_alibabacloud_api_key: API key for Alibaba Cloud DashScope image generation.
external_alibabacloud_base_url: Base URL override for Alibaba Cloud DashScope image generation.
external_gemini_api_key: API key for Gemini image generation.
external_openai_api_key: API key for OpenAI image generation.
external_gemini_base_url: Base URL override for Gemini image generation.
Expand Down Expand Up @@ -223,6 +227,10 @@ class InvokeAIAppConfig(BaseSettings):
strict_password_checking: bool = Field(default=False, description="Enforce strict password requirements. When True, passwords must contain uppercase, lowercase, and numbers. When False (default), any password is accepted but its strength (weak/moderate/strong) is reported to the user.")

# EXTERNAL PROVIDERS
external_alibabacloud_api_key: Optional[str] = Field(default=None, description="API key for Alibaba Cloud DashScope image generation.")
external_alibabacloud_base_url: Optional[str] = Field(
default=None, description="Base URL override for Alibaba Cloud DashScope image generation."
)
external_gemini_api_key: Optional[str] = Field(default=None, description="API key for Gemini image generation.")
external_openai_api_key: Optional[str] = Field(default=None, description="API key for OpenAI image generation.")
external_gemini_base_url: Optional[str] = Field(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from invokeai.app.services.external_generation.providers.alibabacloud import AlibabaCloudProvider
from invokeai.app.services.external_generation.providers.gemini import GeminiProvider
from invokeai.app.services.external_generation.providers.openai import OpenAIProvider

__all__ = ["GeminiProvider", "OpenAIProvider"]
__all__ = ["AlibabaCloudProvider", "GeminiProvider", "OpenAIProvider"]
Loading
Loading