Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
Merge remote-tracking branch 'origin/main' into pr-9787-merge
Lincoln Steinacac5eb39e38
diff --cc docs/src/content/docs/Users Guide/03.Models/02.model-families.mdxindex ca8c0f3c99,dac33bc446..01ae08cdd2--- a/docs/src/content/docs/Users Guide/03.Models/02.model-families.mdx+++ b/docs/src/content/docs/Users Guide/03.Models/02.model-families.mdx@@@ -123,9 -123,10 +123,10 @@@ faster generation| **Z-Image** | Images | 6B model in a fast, few-step Turbo variant and a Base variant. Understands English and Chinese prompts, with ControlNets. | Apache 2.0 | [Z-Image](/users-guide/models/local-models/z-image/) || **ERNIE-Image** | Images | Baidu's 8B text-to-image model, in standard and distilled Turbo variants. | Apache 2.0 | [ERNIE-Image](/users-guide/models/local-models/ernie-image/) || **Qwen Image** | Images | Text-to-image (2512) and instruction-based image editing (Edit 2511), with fast Lightning variants. | Apache 2.0 | [Qwen Image](/users-guide/models/local-models/qwen-image/) |-| **Qwen-Image-2.1** | Images | 7B text-to-image model with strong text rendering and transparent (RGBA) output, in a base and an 8-step Turbo variant. | Non-commercial | [Qwen-Image-2.1](/users-guide/models/local-models/qwen-image-2-1/) |+| **Qwen-Image-2.1** | Images | 7B text-to-image model with strong text rendering and transparent (RGBA) output, in a base and an 8-step Turbo variant. Edits from reference images. | Non-commercial | [Qwen-Image-2.1](/users-guide/models/local-models/qwen-image-2-1/) || **Krea-2** | Images | 12B model in fast Turbo and undistilled Raw variants, with training-free style reference. | Community, free under $1M revenue | [Krea-2](/users-guide/models/local-models/krea-2/) || **Ideogram 4** | Images | Structured prompts that place described elements in regions of the image. | Non-commercial | [Ideogram 4](/users-guide/models/local-models/ideogram4/) |+ | **MOSS-Image** | Images | OpenMOSS's 5B model in Base and SFT variants, with a Qwen3.5 9B text encoder. Renders Chinese and English text and reads JSON layout prompts. | Apache 2.0 | [MOSS-Image](/users-guide/models/local-models/moss-image/) || **Anima** | Images | Compact 2B anime-focused model, with ControlNet-LLLite adapters for inpainting and sketch guidance. | Non-commercial | [Anima](/users-guide/models/local-models/anima/) || **Wan 2.2** | Video, images | Text-to-video and image-to-video, including first/last-frame interpolation. Can also generate single images. | Apache 2.0 | [Wan 2.2](/users-guide/video-generation/wan-22/) || **LTX-2** | Video with audio | Video with a synchronized soundtrack, audio-to-video and video-to-audio, keyframes and extension. | Community, free under $10M revenue | [LTX-2](/users-guide/video-generation/ltx-2/) |diff --cc invokeai/frontend/webv2/src/features/generation/core/graph.tsindex a494fbe42a,2cd7661130..e09cc23450--- a/invokeai/frontend/webv2/src/features/generation/core/graph.ts+++ b/invokeai/frontend/webv2/src/features/generation/core/graph.ts@@@ -1475,66 -1467,85 +1476,145 @@@ const buildQwenImage21Graph =return graph;};+/**+ * Qwen-Image-2.1 reads each reference twice, at one size: the prompt encoder sees it through the vision tower, and+ * the denoise node places its clean latents in the prompt's image slots. Both prompts are encoded with the+ * references, and the latents follow in the same order.+ */+const addQwenImage21ReferenceImages = (+ graph: BackendGraphContract,+ settings: GenerateSettings,+ nodes: {+ conditionings: BackendInvocationContract[];+ denoise: BackendInvocationContract;+ modelLoader: BackendInvocationContract;+ }+): void => {+ const referenceImages = getEnabledReferenceImages(settings, 'qwen_image_2_1_reference_image');+ if (referenceImages.length === 0) {+ return;+ }++ let imageCollect: BackendInvocationContract | null = null;+ let latentsCollect: BackendInvocationContract | null = null;++ for (const { config } of referenceImages) {+ if (!config.image) {+ continue;+ }++ const imageNode = addNode(graph, {+ id: createId('qwen21_ref_img'),+ image: toImageField(config.image),+ type: 'image',+ });+ const i2l = addNode(graph, { id: createId('qwen21_ref_i2l'), reference: true, type: 'qwen_image_2_1_i2l' });+ addEdge(graph, imageNode, 'image', i2l, 'image');+ addEdge(graph, nodes.modelLoader, 'vae', i2l, 'vae');++ const nextImageCollect = addNode(graph, { id: createId('qwen21_ref_img_collect'), type: 'collect' });+ addEdge(graph, imageNode, 'image', nextImageCollect, 'item');+ if (imageCollect) {+ addEdge(graph, imageCollect, 'collection', nextImageCollect, 'collection');+ }+ imageCollect = nextImageCollect;++ const nextLatentsCollect = addNode(graph, { id: createId('qwen21_ref_latents_collect'), type: 'collect' });+ addEdge(graph, i2l, 'latents', nextLatentsCollect, 'item');+ if (latentsCollect) {+ addEdge(graph, latentsCollect, 'collection', nextLatentsCollect, 'collection');+ }+ latentsCollect = nextLatentsCollect;+ }++ if (!imageCollect || !latentsCollect) {+ return;+ }+ for (const conditioning of nodes.conditionings) {+ addEdge(graph, imageCollect, 'collection', conditioning, 'reference_images');+ }+ addEdge(graph, latentsCollect, 'collection', nodes.denoise, 'reference_latents');+};++ const buildMossImageGraph = (+ settings: GenerateSettings,+ model: MainModelConfig,+ outputIsIntermediate: boolean,+ projectSettings: GenerationProjectSettings+ ): BackendGraphContract => {+ // A Diffusers pipeline brings its encoder and VAE; a single-file transformer needs both. The filter drops a stale+ // Qwen3.5 4B selection left over from Anima-3.8B, which shares the setting.+ const isDiffusers = model.format === 'diffusers';+ const vaeModel = getCompatibleVae(settings, model);+ const qwen35EncoderModel = getCompatibleComponent(settings.qwen35EncoderModel, isMossImageQwen35Encoder);++ if (!isDiffusers) {+ requireComponent(qwen35EncoderModel, 'Qwen3.5 9B Encoder');+ requireComponent(vaeModel, 'MOSS-Image VAE');+ }++ const graph: BackendGraphContract = { edges: [], id: createId('moss_image_graph'), nodes: {} };+ const { negativePrompt, positivePrompt, seed } = addPromptAndSeedNodes(graph);+ // The negative branch runs only above CFG 1, where the node requires its conditioning.+ const useCfg = settings.cfgScale > 1;+ const modelLoader = addNode(graph, {+ id: 'model_loader',+ model,+ qwen3_5_encoder_model: qwen35EncoderModel ?? undefined,+ type: 'moss_image_model_loader',+ vae_model: vaeModel ?? undefined,+ });+ const posCond = addNode(graph, { id: 'pos_cond', type: 'moss_image_text_encoder' });+ const negCond = useCfg ? addNode(graph, { id: 'neg_cond', type: 'moss_image_text_encoder' }) : null;+ const denoiseSize = getDenoiseSize(settings, model);+ const denoise = addNode(graph, {+ cfg_scale: settings.cfgScale,+ denoising_end: 1,+ denoising_start: 0,+ height: denoiseSize.height,+ id: 'denoise_latents',+ steps: settings.steps,+ type: 'moss_image_denoise',+ uncond_skip_layers: [...settings.mossImageUncondSkipLayers],+ width: denoiseSize.width,+ });+ // MOSS-Image denoises into the FLUX.2 VAE's raw latent layout, so it decodes, and PiD-decodes, as FLUX.2 does.+ const output = addDecodeOutput({+ denoise,+ graph,+ l2iType: 'flux2_vae_decode',+ model,+ outputIsIntermediate,+ positivePrompt,+ seed,+ settings,+ vaeSource: modelLoader,+ });++ addEdge(graph, modelLoader, 'transformer', denoise, 'transformer');+ // The denoise node reads the VAE's BatchNorm statistics, which define the latent space it works in.+ addEdge(graph, modelLoader, 'vae', denoise, 'vae');+ addEdge(graph, modelLoader, 'qwen3_5_encoder', posCond, 'qwen3_5_encoder');+ addEdge(graph, positivePrompt, 'value', posCond, 'prompt');+ addEdge(graph, posCond, 'conditioning', denoise, 'positive_conditioning');++ if (negCond) {+ addEdge(graph, modelLoader, 'qwen3_5_encoder', negCond, 'qwen3_5_encoder');+ addEdge(graph, negativePrompt, 'value', negCond, 'prompt');+ addEdge(graph, negCond, 'conditioning', denoise, 'negative_conditioning');+ }++ addEdge(graph, seed, 'value', denoise, 'seed');+ addMetadata(graph, output, settings, model, 'moss_image_txt2img', projectSettings, {+ moss_image_uncond_skip_layers: [...settings.mossImageUncondSkipLayers],+ qwen3_5_encoder: qwen35EncoderModel ?? undefined,+ vae: vaeModel ?? undefined,+ ...(shouldUsePidDecode(settings, model.base) ? getPidMetadata(settings) : {}),+ });++ return graph;+ };+const buildIdeogram4Graph = (settings: GenerateSettings,model: MainModelConfig,