From 299680ba190fd4414bc95dda4473ad1c80b7f496 Mon Sep 17 00:00:00 2001 From: Deepratna Awale Date: Wed, 18 Nov 2026 20:05:17 +0000 Subject: [PATCH] Add missing CLIPLoader types and fp8_e4m3fn_fast weight dtype Sync the Inference encoder type dropdown with ComfyUI's CLIPLoader options (krea2, ovis, longcat_image, flux3, ...) and offer the fp8_e4m3fn_fast UNETLoader weight dtype in the model cards. Fixes #1786 --- .../Inference/ModelCardViewModel.cs | 18 ++++++++++++++++- .../Inference/UnetModelCardViewModel.cs | 2 +- .../Api/Comfy/Nodes/ComfyNodeBuilder.cs | 2 +- .../Avalonia/ModelCardWorkflowProfileTests.cs | 20 +++++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs index 1409512f2..3baacd7f3 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs @@ -230,7 +230,7 @@ public HybridModelFile? SelectedUnifiedModel [ObservableProperty] private bool isTextEncodersExpanded = true; - public List WeightDTypes { get; set; } = ["default", "fp8_e4m3fn", "fp8_e5m2"]; + public List WeightDTypes { get; set; } = ["default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2"]; public List ClipTypes { get; set; } = [ "sdxl", @@ -251,6 +251,22 @@ public HybridModelFile? SelectedUnifiedModel "qwen_image", "wan", "omnigen2", + "ovis", + "longcat_image", + "cogvideox", + "lens", + "pixeldit", + "ideogram4", + "boogu", + "krea2", + "joyimage", + "mage", + "minimax", + "yue2", + "flux3", + "moss_image", + "fibo2", + "pan2", "mochi", "pixart", "cosmos", diff --git a/StabilityMatrix.Avalonia/ViewModels/Inference/UnetModelCardViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Inference/UnetModelCardViewModel.cs index 87b3c4b36..ccdf3d432 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Inference/UnetModelCardViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Inference/UnetModelCardViewModel.cs @@ -41,7 +41,7 @@ public partial class UnetModelCardViewModel(IInferenceClientManager clientManage [ObservableProperty] private string selectedDType = "default"; - public List WeightDTypes { get; set; } = ["default", "fp8_e4m3fn", "fp8_e5m2"]; + public List WeightDTypes { get; set; } = ["default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2"]; public IInferenceClientManager ClientManager { get; } = clientManager; diff --git a/StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyNodeBuilder.cs b/StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyNodeBuilder.cs index 071617ac2..5d54bcea6 100644 --- a/StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyNodeBuilder.cs +++ b/StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyNodeBuilder.cs @@ -447,7 +447,7 @@ public record UNETLoader : ComfyTypedNodeBase public required string UnetName { get; init; } /// - /// possible values: "default", "fp8_e4m3fn", "fp8_e5m2" + /// possible values: "default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2" /// public required string WeightDtype { get; init; } } diff --git a/StabilityMatrix.Tests/Avalonia/ModelCardWorkflowProfileTests.cs b/StabilityMatrix.Tests/Avalonia/ModelCardWorkflowProfileTests.cs index 3ac63d050..45fb1025d 100644 --- a/StabilityMatrix.Tests/Avalonia/ModelCardWorkflowProfileTests.cs +++ b/StabilityMatrix.Tests/Avalonia/ModelCardWorkflowProfileTests.cs @@ -124,6 +124,26 @@ public void CustomProfile_OffersCurrentComfyDualClipTypes() CollectionAssert.DoesNotContain(vm.ClipTypes, "HiDream"); } + [TestMethod] + public void CustomProfile_OffersCurrentComfySingleClipTypes() + { + var vm = CreateViewModel(); + + CollectionAssert.Contains(vm.ClipTypes, "lumina2"); + CollectionAssert.Contains(vm.ClipTypes, "krea2"); + CollectionAssert.Contains(vm.ClipTypes, "ovis"); + CollectionAssert.Contains(vm.ClipTypes, "longcat_image"); + CollectionAssert.AllItemsAreUnique(vm.ClipTypes); + } + + [TestMethod] + public void WeightDTypes_IncludeFp8E4m3fnFast() + { + var vm = CreateViewModel(); + + CollectionAssert.Contains(vm.WeightDTypes, "fp8_e4m3fn_fast"); + } + [TestMethod] public void AnimaProfile_WithCheckpointFolderModel_KeepsLoaderAndWarns() {