Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
eb3f1c9
feat: Add Z-Image-Turbo model support
Pfannkuchensack Nov 30, 2025
13ac16e
fix windows path again.
Pfannkuchensack Nov 30, 2025
f05ea28
feat: Add Z-Image LoRA support
Pfannkuchensack Dec 1, 2025
eaf4742
Fix windows path again again
Pfannkuchensack Dec 1, 2025
2b062b2
fix: Improve Flux AI Toolkit LoRA detection to prevent Z-Image miside…
Pfannkuchensack Dec 2, 2025
2802029
feat: Add GGUF quantized Z-Image support and improve VAE/encoder flex…
Pfannkuchensack Dec 2, 2025
66729ea
Fix windows path again again again...
Pfannkuchensack Dec 3, 2025
9f6d04c
Merge branch 'main' into feat/z-image-turbo-support
Pfannkuchensack Dec 4, 2025
4a1710b
fix for the typegen-checks
Pfannkuchensack Dec 5, 2025
b28d58b
Merge branch 'feat/z-image-turbo-support' of https://github.com/Pfann…
Pfannkuchensack Dec 5, 2025
2e0cd4d
Patch from @lstein for the update of diffusers
Pfannkuchensack Dec 6, 2025
e9d5273
feat(z-image): add single-file checkpoint support for Z-Image models
Pfannkuchensack Dec 9, 2025
8413729
feat(z-image): add metadata recall for VAE and Qwen3 encoder
Pfannkuchensack Dec 9, 2025
ba2475c
fix(z-image): improve device/dtype compatibility and error handling
Pfannkuchensack Dec 9, 2025
3e862ce
fix typegen wrong
Pfannkuchensack Dec 9, 2025
0a986c2
fix(ui): replace misused isCheckpointMainModelConfig with isFluxDevMa…
Pfannkuchensack Dec 9, 2025
3b5d9c2
feat(z-image): add Qwen3 GGUF text encoder support and default parame…
Pfannkuchensack Dec 10, 2025
fb1a99b
feat(cache): add partial loading support for Z-Image RMSNorm and Laye…
Pfannkuchensack Dec 10, 2025
8551ff8
fix typegen
Pfannkuchensack Dec 10, 2025
f9605e1
z-image-turbo-fp8-e5m2 works. the z-image-turbo_fp8_scaled_e4m3fn_KJ …
Pfannkuchensack Dec 10, 2025
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
2 changes: 2 additions & 0 deletions invokeai/app/api/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
FLUXConditioningInfo,
SD3ConditioningInfo,
SDXLConditioningInfo,
ZImageConditioningInfo,
)
from invokeai.backend.util.logging import InvokeAILogger
from invokeai.version.invokeai_version import __version__
Expand Down Expand Up @@ -129,6 +130,7 @@ def initialize(
FLUXConditioningInfo,
SD3ConditioningInfo,
CogView4ConditioningInfo,
ZImageConditioningInfo,
],
ephemeral=True,
),
Expand Down
8 changes: 8 additions & 0 deletions invokeai/app/invocations/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class FieldDescriptions:
clip = "CLIP (tokenizer, text encoder, LoRAs) and skipped layer count"
t5_encoder = "T5 tokenizer and text encoder"
glm_encoder = "GLM (THUDM) tokenizer and text encoder"
qwen3_encoder = "Qwen3 tokenizer and text encoder"
clip_embed_model = "CLIP Embed loader"
clip_g_model = "CLIP-G Embed loader"
unet = "UNet (scheduler, LoRAs)"
Expand All @@ -169,6 +170,7 @@ class FieldDescriptions:
flux_model = "Flux model (Transformer) to load"
sd3_model = "SD3 model (MMDiTX) to load"
cogview4_model = "CogView4 model (Transformer) to load"
z_image_model = "Z-Image model (Transformer) to load"
sdxl_main_model = "SDXL Main model (UNet, VAE, CLIP1, CLIP2) to load"
sdxl_refiner_model = "SDXL Refiner Main Modde (UNet, VAE, CLIP2) to load"
onnx_main_model = "ONNX Main model (UNet, VAE, CLIP) to load"
Expand Down Expand Up @@ -321,6 +323,12 @@ class CogView4ConditioningField(BaseModel):
conditioning_name: str = Field(description="The name of conditioning tensor")


class ZImageConditioningField(BaseModel):
"""A Z-Image conditioning tensor primitive value"""

conditioning_name: str = Field(description="The name of conditioning tensor")


class ConditioningField(BaseModel):
"""A conditioning tensor primitive value"""

Expand Down
10 changes: 9 additions & 1 deletion invokeai/app/invocations/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ def invoke(self, context: InvocationContext) -> MetadataOutput:
"cogview4_img2img",
"cogview4_inpaint",
"cogview4_outpaint",
"z_image_txt2img",
"z_image_img2img",
"z_image_inpaint",
"z_image_outpaint",
]


Expand All @@ -166,7 +170,7 @@ def invoke(self, context: InvocationContext) -> MetadataOutput:
title="Core Metadata",
tags=["metadata"],
category="metadata",
version="2.0.0",
version="2.1.0",
classification=Classification.Internal,
)
class CoreMetadataInvocation(BaseInvocation):
Expand Down Expand Up @@ -217,6 +221,10 @@ class CoreMetadataInvocation(BaseInvocation):
default=None,
description="The VAE used for decoding, if the main model's default was not used",
)
qwen3_encoder: Optional[ModelIdentifierField] = InputField(
default=None,
description="The Qwen3 text encoder model used for Z-Image inference",
)

# High resolution fix metadata.
hrf_enabled: Optional[bool] = InputField(
Expand Down
8 changes: 8 additions & 0 deletions invokeai/app/invocations/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ class GlmEncoderField(BaseModel):
text_encoder: ModelIdentifierField = Field(description="Info to load text_encoder submodel")


class Qwen3EncoderField(BaseModel):
"""Field for Qwen3 text encoder used by Z-Image models."""

tokenizer: ModelIdentifierField = Field(description="Info to load tokenizer submodel")
text_encoder: ModelIdentifierField = Field(description="Info to load text_encoder submodel")
loras: List[LoRAField] = Field(default_factory=list, description="LoRAs to apply on model loading")


class VAEField(BaseModel):
vae: ModelIdentifierField = Field(description="Info to load vae submodel")
seamless_axes: List[str] = Field(default_factory=list, description='Axes("x" and "y") to which apply seamless')
Expand Down
12 changes: 12 additions & 0 deletions invokeai/app/invocations/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
SD3ConditioningField,
TensorField,
UIComponent,
ZImageConditioningField,
)
from invokeai.app.services.images.images_common import ImageDTO
from invokeai.app.services.shared.invocation_context import InvocationContext
Expand Down Expand Up @@ -461,6 +462,17 @@ def build(cls, conditioning_name: str) -> "CogView4ConditioningOutput":
return cls(conditioning=CogView4ConditioningField(conditioning_name=conditioning_name))


@invocation_output("z_image_conditioning_output")
class ZImageConditioningOutput(BaseInvocationOutput):
"""Base class for nodes that output a Z-Image text conditioning tensor."""

conditioning: ZImageConditioningField = OutputField(description=FieldDescriptions.cond)

@classmethod
def build(cls, conditioning_name: str) -> "ZImageConditioningOutput":
return cls(conditioning=ZImageConditioningField(conditioning_name=conditioning_name))


@invocation_output("conditioning_output")
class ConditioningOutput(BaseInvocationOutput):
"""Base class for nodes that output a single conditioning tensor"""
Expand Down
Loading
Loading