Skip to content

Commit c1b2401

Browse files
authored
Merge pull request LykosAI#1243 from ionite34/codex/unet-workflow-support
[codex] Add official Inference support for Z-Image, Anima, and Flux.2
2 parents 67da830 + e85bcc8 commit c1b2401

12 files changed

Lines changed: 748 additions & 202 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
99
### Added
1010
- Added CivArchive model browser with details page, image viewer, version selector, trigger words, and in-app downloads with tracked progress
1111
- Added support for the civitai.red (mature-content) domain — NSFW CivitAI links now open and copy as civitai.red URLs, and pasting a civitai.red URL into the CivitAI model browser search works the same as a civitai.com URL
12+
- Added official Inference support for the **Z-Image** (Base + Turbo), **Anima**, and **Flux.2** model architectures — workflow-appropriate text encoders, latent shapes, schedulers, and model sampling (AuraFlow for Z-Image, `Flux2Scheduler` for Flux.2) are wired up automatically across Text-to-Image and Image-to-Image
13+
- Added an Inference **Workflow** selector to the Model card with profiles for Default/Checkpoint, Flux, Flux.2, Z-Image Base/Turbo, Anima, HiDream, and Custom
14+
- **Auto** (default) detects the workflow from the model's CivitAI metadata, with filename fallbacks for models without metadata, and shows the resolved profile inline below the selector
15+
- Sparkle button applies recommended sampler / scheduler / steps / CFG presets for the active workflow — e.g. `res_multistep` / `simple` / 8 steps / CFG 1 for Z-Image Turbo, `er_sde` / `simple` / 30 steps / CFG 4 for Anima, `euler` / 20 steps / CFG 5 for Flux.2
16+
- Choosing a non-Auto profile reveals a manual Encoder Type selector for advanced overrides (e.g. running Z-Image Turbo with the `sd3` encoder)
17+
- Opening the model browser from the Model card pre-filters to the workflow's compatible base models, without overwriting your saved picker filters
18+
- Added `er_sde` and `res_multistep` to the Inference sampler list
19+
- Added `stable_diffusion`, `flux2`, and `lumina2` Encoder Type options for UNet workflows
1220
- Added a checkpoint organizer for previewing and reorganizing local models using connected metadata-driven folder and filename patterns (requested in [#280](https://github.com/LykosAI/StabilityMatrix/issues/280), [#424](https://github.com/LykosAI/StabilityMatrix/issues/424))
1321
### Changed
1422
- The CivitAI base model type filter now uses CivitAI's official `/api/v1/enums` endpoint, with fallbacks to the previous technique and a built-in list, so the filter stays populated even if the CivitAI response format changes or the service is unreachable
23+
- Single-encoder UNet workflows (Anima, Flux.2, Z-Image) now use the matching CLIPLoader instead of assuming Flux-style dual encoders
1524
### Fixed
1625
- Fixed CivitAI model browsing breaking during Discovery API outages — the browser now falls back to the direct CivitAI API when Discovery returns a server error, authentication failure, or times out
26+
- Fixed UNet-only Inference model selection sometimes clearing during model-list refreshes — text encoder slots no longer disappear after generating, cancelling a generation, or reconnecting to ComfyUI
1727
- Fixed SwarmUI user settings (theme, output format, server configuration, etc.) and any user-added backend entries being overwritten when the install flow ran over an existing install — `Settings.fds` and `Backends.fds` are now merged with their existing contents instead of being rewritten from a stale template
1828
- Fixed pip requirements handling for environment-marker dependencies - thanks to @NeuralFault!
1929
- Fixed [#1608](https://github.com/LykosAI/StabilityMatrix/issues/1608) - Crash when cdn fetch fails due to error notification not being shown on UI Thread - thanks to @NeuralFault!

StabilityMatrix.Avalonia/Controls/Inference/ModelCard.axaml

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<controls:Card Padding="12">
4444
<StackPanel Spacing="0">
4545
<!-- Model Row -->
46-
<Grid ColumnDefinitions="60,*,Auto">
46+
<Grid ColumnDefinitions="70,*,Auto">
4747
<TextBlock
4848
Grid.Column="0"
4949
VerticalAlignment="Center"
@@ -114,7 +114,7 @@
114114
<!-- Refiner (below Model, when enabled) -->
115115
<Grid
116116
Margin="0,8,0,0"
117-
ColumnDefinitions="60,*,Auto"
117+
ColumnDefinitions="70,*,Auto"
118118
IsVisible="{Binding IsRefinerSelectionEnabled}">
119119
<TextBlock
120120
Grid.Column="0"
@@ -138,6 +138,50 @@
138138
</Button>
139139
</Grid>
140140

141+
<!-- Workflow Profile -->
142+
<Grid Margin="0,8,0,0" ColumnDefinitions="70,*,Auto">
143+
<TextBlock
144+
Grid.Column="0"
145+
VerticalAlignment="Center"
146+
Text="Workflow"
147+
TextAlignment="Left" />
148+
<controls:BetterComboBox
149+
Grid.Column="1"
150+
Padding="8,6,4,6"
151+
HorizontalAlignment="Stretch"
152+
ItemsSource="{Binding WorkflowProfiles}"
153+
SelectedItem="{Binding SelectedWorkflowProfile}">
154+
<controls:BetterComboBox.Resources>
155+
<converters:EnumStringConverter x:Key="EnumStringConverter" />
156+
</controls:BetterComboBox.Resources>
157+
<controls:BetterComboBox.ItemTemplate>
158+
<DataTemplate>
159+
<TextBlock Text="{Binding ., Converter={StaticResource EnumStringConverter}}" />
160+
</DataTemplate>
161+
</controls:BetterComboBox.ItemTemplate>
162+
<controls:BetterComboBox.SelectionBoxItemTemplate>
163+
<DataTemplate>
164+
<TextBlock Text="{Binding ., Converter={StaticResource EnumStringConverter}}" />
165+
</DataTemplate>
166+
</controls:BetterComboBox.SelectionBoxItemTemplate>
167+
</controls:BetterComboBox>
168+
<Button
169+
Grid.Column="2"
170+
Margin="4,0,0,0"
171+
VerticalAlignment="Stretch"
172+
Command="{Binding ApplyRecommendedDefaultsCommand}"
173+
IsEnabled="{Binding HasRecommendedDefaults}"
174+
ToolTip.Tip="{Binding RecommendedDefaultsToolTip}">
175+
<fluent:SymbolIcon FontSize="16" Symbol="Sparkle" />
176+
</Button>
177+
</Grid>
178+
<TextBlock
179+
Margin="90,4,0,0"
180+
FontSize="11"
181+
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
182+
IsVisible="{Binding ShowWorkflowProfileStatus}"
183+
Text="{Binding WorkflowProfileStatusText}" />
184+
141185
<!-- Advanced Options Expander (Precision, VAE, CLIP Skip) -->
142186
<Expander
143187
Margin="0,8,0,0"
@@ -240,7 +284,7 @@
240284
</Expander.Header>
241285
<StackPanel Margin="0,4,0,0" Spacing="8">
242286
<!-- Encoder Type -->
243-
<Grid ColumnDefinitions="90,*">
287+
<Grid ColumnDefinitions="90,*" IsVisible="{Binding ShowEncoderTypeSelection}">
244288
<TextBlock
245289
Grid.Column="0"
246290
VerticalAlignment="Center"

0 commit comments

Comments
 (0)