Skip to content

Commit b2448ac

Browse files
committed
flux2 vae swap setting
1 parent 3ffdddd commit b2448ac

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

docs/Model Support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ These steps are not friendly to beginners (if Sana gains popularity, likely more
331331
- Or GGUF version here <https://huggingface.co/orabazes/FLUX.2-dev-GGUF/tree/main>
332332
- Goes in `diffusion_models` folder
333333
- The VAE is a brand new 16x16 downsample VAE with 128 channels. It will be autodownloaded.
334+
- You can swap it for this one <https://huggingface.co/CabalResearch/Flux2VAE-Anime-Decoder-Tune/blob/main/Flux2Anime%20VAE%20DecB1.safetensors> which is a finetune to reduce detail artifacting.
334335
- The Text Encoder is 24B Mistral Small 3.2 (2506). It will be autodownloaded.
335336
- This would make sense to replace with a GGUF. (Pending gguf download link)
336337
- **Parameters:**

src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC)
877877
else if (IsFlux2())
878878
{
879879
helpers.LoadClip("flux2", helpers.GetMistralFlux2Model());
880-
helpers.DoVaeLoader(null, "flux-2", "flux2-vae");
880+
helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFlux2VAE, "flux-2", "flux2-vae");
881881
}
882882
else if (IsFlux() && (LoadingClip is null || LoadingVAE is null || UserInput.Get(T2IParamTypes.T5XXLModel) is not null || UserInput.Get(T2IParamTypes.ClipLModel) is not null))
883883
{

src/Core/Settings.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,10 @@ public class VAEsData : AutoConfiguration
492492
[ManualSettingsOptions(Impl = null, Vals = ["None"])]
493493
public string DefaultFluxVAE = "None";
494494

495+
[ConfigComment("What VAE to use with Flux2 models by default.")]
496+
[ManualSettingsOptions(Impl = null, Vals = ["None"])]
497+
public string DefaultFlux2VAE = "None";
498+
495499
[ConfigComment("What VAE to use with SD3 models by default.")]
496500
[ManualSettingsOptions(Impl = null, Vals = ["None"])]
497501
public string DefaultSD3VAE = "None";

src/wwwroot/js/genpage/helpers/settings_editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function applyThemeSetting(theme_info) {
154154
function loadUserSettings(callback = null) {
155155
genericRequest('GetUserSettings', {}, data => {
156156
if (coreModelMap['VAE'] != null) {
157-
for (let setting of ['defaultsdxlvae', 'defaultsdv1vae', 'defaultsvdvae', 'defaultfluxvae', 'defaultsd3vae', 'defaultmochivae']) {
157+
for (let setting of ['defaultsdxlvae', 'defaultsdv1vae', 'defaultsvdvae', 'defaultfluxvae', 'defaultflux2vae', 'defaultsd3vae', 'defaultmochivae']) {
158158
data.settings.vaes.value[setting].values = ['None'].concat(coreModelMap['VAE']);
159159
}
160160
}

0 commit comments

Comments
 (0)