From 4a354f5e51999367ddd3d92b91a3ed333f885f35 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 17:18:04 -0600 Subject: [PATCH 01/16] Adds Boogu image support --- .../ComfyUIBackend/WorkflowGenerator.cs | 28 ++++++++++++++++++- .../WorkflowGeneratorModelSupport.cs | 18 ++++++++++++ src/Text2Image/T2IModelClassSorter.cs | 9 +++++- 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs index 2b4eda892..7c72557fd 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs @@ -971,7 +971,7 @@ public string CreateKSampler(JArray model, JArray pos, JArray neg, JArray latent defscheduler ??= "simple"; } // TODO: Registry of model default preferences instead of this - else if (IsFlux() || IsWanVideo() || IsWanVideo22() || IsOmniGen() || IsQwenImage() || IsZImage() || IsZetaChroma() || IsErnie() || IsHiDreamO1() || IsLens() || IsPixelDiT()) + else if (IsFlux() || IsWanVideo() || IsWanVideo22() || IsOmniGen() || IsQwenImage() || IsZImage() || IsZetaChroma() || IsErnie() || IsHiDreamO1() || IsLens() || IsPixelDiT() || IsBoogu() ) { defscheduler ??= "simple"; } @@ -2406,6 +2406,32 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode }, id); } } + else if (IsBoogu() && id is null && (qwenImage = GetPromptImage(true, true)) is not null) + { + if (!NodeHelpers.TryGetValue("__boogu_edit_cond__", out string booguNode)) + { + JObject booguInputs = new() + { + ["clip"] = clip, + ["prompt"] = prompt, + ["negative_prompt"] = UserInput.Get(T2IParamTypes.NegativePrompt, ""), + ["vae"] = CurrentVae.Path, + ["image_1"] = qwenImage + }; + for (int i = 1; i < 16; i++) + { + JArray extraImg = GetPromptImage(true, true, i); + if (extraImg is null) + { + break; + } + booguInputs[$"image_{i + 1}"] = extraImg; + } + booguNode = CreateNode("TextEncodeBooguEdit", booguInputs); + NodeHelpers["__boogu_edit_cond__"] = booguNode; + } + return [booguNode, isPositive ? 0 : 1]; + } else if (IsHunyuanVideoI2V() && prompt.StartsWith("'); diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index f415248d3..1e06b309d 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -154,6 +154,9 @@ public bool IsQwenImageEditPlus() /// Returns true if the current model is Ideogram 4. public bool IsIdeogram4() => IsModelCompatClass(T2IModelClassSorter.CompatIdeogram4); + /// Returns true if the current model is Boogu. + public bool IsBoogu() => IsModelCompatClass(T2IModelClassSorter.CompatBoogu); + /// Returns true if the current model is Hunyuan Video (original / v1). public bool IsHunyuanVideo() => IsModelCompatClass(T2IModelClassSorter.CompatHunyuanVideo); @@ -1123,6 +1126,21 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) LoadingModel = [samplingNode, 0]; } } + else if (IsBoogu()) + { + helpers.LoadClip("boogu", helpers.GetQwen3vl_8bModel()); + helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFluxVAE, "flux-1", "flux-ae"); + double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3, sectionId: sectionId); + if (shift > 0) + { + string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() + { + ["model"] = LoadingModel, + ["shift"] = shift + }); + LoadingModel = [samplingNode, 0]; + } + } else if (IsFlux() && (LoadingClip is null || LoadingVAE is null || UserInput.Get(T2IParamTypes.T5XXLModel) is not null || UserInput.Get(T2IParamTypes.ClipLModel) is not null)) { helpers.LoadClip2("flux", helpers.GetT5XXLModel(), helpers.GetClipLModel()); diff --git a/src/Text2Image/T2IModelClassSorter.cs b/src/Text2Image/T2IModelClassSorter.cs index 9217787c6..e64e7b1db 100644 --- a/src/Text2Image/T2IModelClassSorter.cs +++ b/src/Text2Image/T2IModelClassSorter.cs @@ -93,6 +93,7 @@ public static T2IModelCompatClass CompatPiD = RegisterCompat(new() { ID = "pid", ShortCode = "PiD", LorasTargetTextEnc = false }), CompatPixelDiT = RegisterCompat(new() { ID = "pixeldit", ShortCode = "PixDiT", LorasTargetTextEnc = false }), CompatIdeogram4 = RegisterCompat(new() { ID = "ideogram-4", ShortCode = "Ideo4", LorasTargetTextEnc = false, VaeFamily = VaeFlux2 }), + CompatBoogu = RegisterCompat(new() { ID = "boogu", ShortCode = "Boogu", LorasTargetTextEnc = false, VaeFamily = VaeFlux1 }), // Audio models CompatAceStep15 = RegisterCompat(new() { ID = "ace-step-1_5", ShortCode = "Ace15", IsAudioModel = true }), // Obscure old random ones @@ -231,7 +232,8 @@ bool isZImageLora(JObject h) => (hasLoraKey(h, "layers.0.adaLN_modulation.0") && bool isChromaRadiance(JObject h) => h.ContainsKey("nerf_image_embedder.embedder.0.bias"); bool isPiD(JObject h) => h.ContainsKey("net.lq_proj.latent_proj.0.weight") && h.ContainsKey("net.pixel_blocks.0.attn.q_norm.weight") && h.ContainsKey("net.pixel_blocks.0.compress_to_attn.weight"); bool isPixelDiT(JObject h) => h.ContainsKey("core.pixel_embedder.proj.weight") && h.ContainsKey("core.pixel_blocks.0.attn.q_norm.weight") && h.ContainsKey("core.pixel_blocks.0.compress_to_attn.weight") && !isPiD(h); - bool isOmniGen(JObject h) => h.ContainsKey("time_caption_embed.timestep_embedder.linear_2.weight") && h.ContainsKey("context_refiner.0.attn.norm_k.weight"); + bool isOmniGen(JObject h) => h.ContainsKey("time_caption_embed.timestep_embedder.linear_2.weight") && h.ContainsKey("context_refiner.0.attn.norm_k.weight") && !isBoogu(h); + bool isBoogu(JObject h) => hasKey(h, "double_stream_layers.0.img_instruct_attn.processor.img_to_q.weight") && hasKey(h, "double_stream_layers.0.img_instruct_attn.processor.instruct_to_q.weight"); bool isQwenImage(JObject h) => (h.ContainsKey("time_text_embed.timestep_embedder.linear_1.bias") && h.ContainsKey("img_in.bias") && (h.ContainsKey("transformer_blocks.0.attn.add_k_proj.bias") || h.ContainsKey("transformer_blocks.0.attn.add_qkv_proj.bias"))) || (h.ContainsKey("model.diffusion_model.time_text_embed.timestep_embedder.linear_1.bias") && h.ContainsKey("model.diffusion_model.img_in.bias") && (h.ContainsKey("model.diffusion_model.transformer_blocks.0.attn.add_k_proj.bias") || h.ContainsKey("model.diffusion_model.transformer_blocks.0.attn.add_qkv_proj.bias"))); bool isQwenImageEdit2511(JObject h) => h.ContainsKey("__index_timestep_zero__"); @@ -852,6 +854,11 @@ JToken GetEmbeddingKey(JObject h) { return isLongcat(h); }}); + // ====================== Boogu ====================== + Register(new() { ID = "boogu", CompatClass = CompatBoogu, Name = "Boogu", StandardWidth = 1024, StandardHeight = 1024, IsThisModelOfClass = (m, h) => + { + return isBoogu(h); + }}); // ====================== Audio Models ====================== Register(new() { ID = "ace-step-1_5", CompatClass = CompatAceStep15, Name = "Ace Step 1.5", IsThisModelOfClass = (m, h) => { From b18ed88b48c1e38b80494aa9e11bbdb9f38ddb3e Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 17:26:20 -0600 Subject: [PATCH 02/16] Formatting --- src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs index 7c72557fd..55c4825fc 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs @@ -971,7 +971,7 @@ public string CreateKSampler(JArray model, JArray pos, JArray neg, JArray latent defscheduler ??= "simple"; } // TODO: Registry of model default preferences instead of this - else if (IsFlux() || IsWanVideo() || IsWanVideo22() || IsOmniGen() || IsQwenImage() || IsZImage() || IsZetaChroma() || IsErnie() || IsHiDreamO1() || IsLens() || IsPixelDiT() || IsBoogu() ) + else if (IsFlux() || IsWanVideo() || IsWanVideo22() || IsOmniGen() || IsQwenImage() || IsZImage() || IsZetaChroma() || IsErnie() || IsHiDreamO1() || IsLens() || IsPixelDiT() || IsBoogu()) { defscheduler ??= "simple"; } From a5836c35d4f8c051d4d497e67bec19ba88038ac5 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 19:46:36 -0600 Subject: [PATCH 03/16] Closer implementation to source --- .../ComfyUIBackend/WorkflowGenerator.cs | 58 ++++++++++--------- .../WorkflowGeneratorModelSupport.cs | 20 ++++--- .../ComfyUIBackend/WorkflowGeneratorSteps.cs | 16 ++++- 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs index 55c4825fc..ed19651db 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs @@ -970,8 +970,16 @@ public string CreateKSampler(JArray model, JArray pos, JArray neg, JArray latent defsampler ??= "lcm"; defscheduler ??= "simple"; } + else if (IsBoogu()) + { + if (IsBooguEdit()) + { + defsampler ??= "dpmpp_2m"; + } + defscheduler ??= "simple"; + } // TODO: Registry of model default preferences instead of this - else if (IsFlux() || IsWanVideo() || IsWanVideo22() || IsOmniGen() || IsQwenImage() || IsZImage() || IsZetaChroma() || IsErnie() || IsHiDreamO1() || IsLens() || IsPixelDiT() || IsBoogu()) + else if (IsFlux() || IsWanVideo() || IsWanVideo22() || IsOmniGen() || IsQwenImage() || IsZImage() || IsZetaChroma() || IsErnie() || IsHiDreamO1() || IsLens() || IsPixelDiT()) { defscheduler ??= "simple"; } @@ -2406,32 +2414,6 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode }, id); } } - else if (IsBoogu() && id is null && (qwenImage = GetPromptImage(true, true)) is not null) - { - if (!NodeHelpers.TryGetValue("__boogu_edit_cond__", out string booguNode)) - { - JObject booguInputs = new() - { - ["clip"] = clip, - ["prompt"] = prompt, - ["negative_prompt"] = UserInput.Get(T2IParamTypes.NegativePrompt, ""), - ["vae"] = CurrentVae.Path, - ["image_1"] = qwenImage - }; - for (int i = 1; i < 16; i++) - { - JArray extraImg = GetPromptImage(true, true, i); - if (extraImg is null) - { - break; - } - booguInputs[$"image_{i + 1}"] = extraImg; - } - booguNode = CreateNode("TextEncodeBooguEdit", booguInputs); - NodeHelpers["__boogu_edit_cond__"] = booguNode; - } - return [booguNode, isPositive ? 0 : 1]; - } else if (IsHunyuanVideoI2V() && prompt.StartsWith("'); @@ -2543,6 +2525,28 @@ public JArray CreateConditioningLine(string prompt, JArray clip, T2IModel model, return first; } + /// Creates a "TextEncodeBooguEdit" node, which outputs both positive and negative conditioning. + public string CreateBooguEditConditioning(JArray clip, string id = null) + { + JObject inputs = new() + { + ["clip"] = clip, + ["prompt"] = UserInput.Get(T2IParamTypes.Prompt, ""), + ["negative_prompt"] = UserInput.Get(T2IParamTypes.NegativePrompt, ""), + ["vae"] = CurrentVae.Path + }; + for (int i = 0; i < 16; i++) + { + JArray img = GetPromptImage(true, true, i); + if (img is null) + { + break; + } + inputs[$"images.image_{i + 1}"] = img; + } + return CreateNode("TextEncodeBooguEdit", inputs, id); + } + public record struct RegionHelper(JArray PartCond, JArray Mask); public bool ShouldZeroNegative() diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index 1e06b309d..84a737010 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -157,6 +157,9 @@ public bool IsQwenImageEditPlus() /// Returns true if the current model is Boogu. public bool IsBoogu() => IsModelCompatClass(T2IModelClassSorter.CompatBoogu); + /// Returns true if the current model is Boogu and has a prompt image (consider it edit model). + public bool IsBooguEdit() => IsBoogu() && UserInput.TryGet(T2IParamTypes.PromptImages, out List images) && images.Count > 0; + /// Returns true if the current model is Hunyuan Video (original / v1). public bool IsHunyuanVideo() => IsModelCompatClass(T2IModelClassSorter.CompatHunyuanVideo); @@ -1130,15 +1133,18 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) { helpers.LoadClip("boogu", helpers.GetQwen3vl_8bModel()); helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFluxVAE, "flux-1", "flux-ae"); - double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3, sectionId: sectionId); - if (shift > 0) + if (IsBooguEdit()) { - string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() + double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3.16, sectionId: sectionId); + if (shift > 0) { - ["model"] = LoadingModel, - ["shift"] = shift - }); - LoadingModel = [samplingNode, 0]; + string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() + { + ["model"] = LoadingModel, + ["shift"] = shift + }); + LoadingModel = [samplingNode, 0]; + } } } else if (IsFlux() && (LoadingClip is null || LoadingVAE is null || UserInput.Get(T2IParamTypes.T5XXLModel) is not null || UserInput.Get(T2IParamTypes.ClipLModel) is not null)) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs index f7c974cc0..3cdd2176d 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs @@ -579,7 +579,16 @@ public static void Register() #region Positive Prompt AddStep(g => { - g.FinalPrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.Prompt), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), true, "6"); + if (g.IsBooguEdit()) + { + string booguEdit = g.CreateBooguEditConditioning(g.CurrentTextEnc.Path, "6"); + g.FinalPrompt = [booguEdit, 0]; + g.FinalNegativePrompt = [booguEdit, 1]; + } + else + { + g.FinalPrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.Prompt), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), true, "6"); + } }, -8); #endregion #region ReVision/UnCLIP/IPAdapter @@ -981,7 +990,10 @@ void requireLora(string name, string url, string hash) #region Negative Prompt AddStep(g => { - g.FinalNegativePrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.NegativePrompt, ""), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), false, "7"); + if (!g.IsBooguEdit()) + { + g.FinalNegativePrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.NegativePrompt, ""), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), false, "7"); + } }, -7); #endregion #region ControlNet From 19a16527b7dcf4cefe75599044c77c16158f28d1 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 20:15:09 -0600 Subject: [PATCH 04/16] Simple docs --- docs/Model Support.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/Model Support.md b/docs/Model Support.md index 3c7471aec..c08228407 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -22,6 +22,7 @@ [HiDream O1](#hidream-o1) | "Pixel UiT" | 2026 | HiDream | 8B | Minimal | Modern, intelligent, fast, decent quality | [Lens](#lens) | MMDiT | 2026 | Microsoft | 4B | Minimal | Modern, lightweight, eh quality | [Ideogram 4](#ideogram-4) | DiT | 2026 | Ideogram AI | 9B | Yes | Modern, advanced on input understanding | +[Boogu](#boogu) | MLLM | 2026 | Boogu | 10B | No | Modern, fast | Old or bad options also tracked listed via [Obscure Model Support](/docs/Obscure%20Model%20Support.md): @@ -664,6 +665,24 @@ For upscaling with SD3, the `Refiner Do Tiling` parameter is highly recommended - **Resolution:** Side length `1024` is the default. - **Sigma Shift:** Default is `5`, but `1` is the legacy default. Sigma shift does nothing on the +# Boogu + +- [Boogu]() is supported in SwarmUI! +- It is a 10B model, with a base model and an official turbo distill designed to run fast, and edit model. + - Base: [Comfy-Org/Boogu-Image - Base FP8]() + - Edit: [Comfy-Org/Boogu-Image - Edit FP8]() + - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Edit nvfp4]() + - Turbo: [Comfy-Org/Boogu-Image - Turbo FP8]() + - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Turbo nvfp4]() +- Uses the Flux.1 VAE and a Qwen3-VL text encoder, both downloaded and handled automatically. +- For editing, use the `Edit` model and give it an init image - SwarmUI automatically wires it in as the reference. +- **Parameters:** + - **Sampler**: For Turbo, use LCM, otherwise default is fine. + - **Scheduler:** For Turbo, use SGM Uniform, otherwise default is fine. + - **CFG Scale:** For Turbo, `1`, otherwise normal CFG ranges (around `5`). + - **Steps:** For Turbo, `4` is recommended, otherwise `20` as normal. + - **Resolution:** Side length `1024` is the default. + - **Sigma Shift:** For Edit default is `3.16`, handled automatically. # Video Models From 320ddaf018d079149c0549dc6497f3140389dda6 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 20:21:18 -0600 Subject: [PATCH 05/16] init image -> prompt image --- docs/Model Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Model Support.md b/docs/Model Support.md index c08228407..3b7a67768 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -675,7 +675,7 @@ For upscaling with SD3, the `Refiner Do Tiling` parameter is highly recommended - Turbo: [Comfy-Org/Boogu-Image - Turbo FP8]() - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Turbo nvfp4]() - Uses the Flux.1 VAE and a Qwen3-VL text encoder, both downloaded and handled automatically. -- For editing, use the `Edit` model and give it an init image - SwarmUI automatically wires it in as the reference. +- For editing, use the `Edit` model and give it a prompt image - SwarmUI automatically wires it in as the reference. - **Parameters:** - **Sampler**: For Turbo, use LCM, otherwise default is fine. - **Scheduler:** For Turbo, use SGM Uniform, otherwise default is fine. From 9c68e8bcb685187d94937f0767ffc63afcc37387 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 20:28:22 -0600 Subject: [PATCH 06/16] Censorship == minimal --- docs/Model Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Model Support.md b/docs/Model Support.md index 3b7a67768..3313c3be5 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -22,7 +22,7 @@ [HiDream O1](#hidream-o1) | "Pixel UiT" | 2026 | HiDream | 8B | Minimal | Modern, intelligent, fast, decent quality | [Lens](#lens) | MMDiT | 2026 | Microsoft | 4B | Minimal | Modern, lightweight, eh quality | [Ideogram 4](#ideogram-4) | DiT | 2026 | Ideogram AI | 9B | Yes | Modern, advanced on input understanding | -[Boogu](#boogu) | MLLM | 2026 | Boogu | 10B | No | Modern, fast | +[Boogu](#boogu) | MLLM | 2026 | Boogu | 10B | Minimal | Modern, fast | Old or bad options also tracked listed via [Obscure Model Support](/docs/Obscure%20Model%20Support.md): From d7dbd2bc81c2581addf6742ce87fc5e6d72e9288 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 20:30:08 -0600 Subject: [PATCH 07/16] Sigma Shift already 3.16 baked into ComfyUI def --- .../ComfyUIBackend/WorkflowGeneratorModelSupport.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index 84a737010..3d9cae829 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -1133,19 +1133,6 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) { helpers.LoadClip("boogu", helpers.GetQwen3vl_8bModel()); helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFluxVAE, "flux-1", "flux-ae"); - if (IsBooguEdit()) - { - double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3.16, sectionId: sectionId); - if (shift > 0) - { - string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() - { - ["model"] = LoadingModel, - ["shift"] = shift - }); - LoadingModel = [samplingNode, 0]; - } - } } else if (IsFlux() && (LoadingClip is null || LoadingVAE is null || UserInput.Get(T2IParamTypes.T5XXLModel) is not null || UserInput.Get(T2IParamTypes.ClipLModel) is not null)) { From 926ef2e0782d966cefc47a44a714a6e977d9560d Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 20:30:33 -0600 Subject: [PATCH 08/16] MLLM -> MMDiT --- docs/Model Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Model Support.md b/docs/Model Support.md index 3313c3be5..b49df8ced 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -22,7 +22,7 @@ [HiDream O1](#hidream-o1) | "Pixel UiT" | 2026 | HiDream | 8B | Minimal | Modern, intelligent, fast, decent quality | [Lens](#lens) | MMDiT | 2026 | Microsoft | 4B | Minimal | Modern, lightweight, eh quality | [Ideogram 4](#ideogram-4) | DiT | 2026 | Ideogram AI | 9B | Yes | Modern, advanced on input understanding | -[Boogu](#boogu) | MLLM | 2026 | Boogu | 10B | Minimal | Modern, fast | +[Boogu](#boogu) | MMDiT | 2026 | Boogu | 10B | Minimal | Modern, fast | Old or bad options also tracked listed via [Obscure Model Support](/docs/Obscure%20Model%20Support.md): From f23f63a815722c3743ace7612a6cd4d9fdf79d69 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Wed, 17 Jun 2026 20:34:41 -0600 Subject: [PATCH 09/16] Default sampler == DPM++ 2M --- docs/Model Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Model Support.md b/docs/Model Support.md index b49df8ced..d445a8a3b 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -677,7 +677,7 @@ For upscaling with SD3, the `Refiner Do Tiling` parameter is highly recommended - Uses the Flux.1 VAE and a Qwen3-VL text encoder, both downloaded and handled automatically. - For editing, use the `Edit` model and give it a prompt image - SwarmUI automatically wires it in as the reference. - **Parameters:** - - **Sampler**: For Turbo, use LCM, otherwise default is fine. + - **Sampler**: For Turbo, use LCM, otherwise DPM++ 2M is fine. - **Scheduler:** For Turbo, use SGM Uniform, otherwise default is fine. - **CFG Scale:** For Turbo, `1`, otherwise normal CFG ranges (around `5`). - **Steps:** For Turbo, `4` is recommended, otherwise `20` as normal. From 476c39a18e7cfd47f331cc8312707d65744ac54b Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 18 Jun 2026 07:22:36 -0600 Subject: [PATCH 10/16] Piggyback off of existing ReferenceLatent pattern --- .../ComfyUIBackend/WorkflowGenerator.cs | 48 +++++++++---------- .../ComfyUIBackend/WorkflowGeneratorSteps.cs | 16 +------ 2 files changed, 25 insertions(+), 39 deletions(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs index ed19651db..c92804e9d 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs @@ -769,9 +769,9 @@ public List LoadPromptImagesForMainRef(List images) public (JArray, JArray, JArray, JArray) BuildInputImageHandling(List images, JArray pos, JArray neg, JArray latent) { JArray imgNeg = null; - if (IsKontext() || IsOmniGen() || IsQwenImage() || IsAnyFlux2()) + if (IsKontext() || IsOmniGen() || IsQwenImage() || IsAnyFlux2() || IsBoogu()) { - if (IsOmniGen() || IsQwenImageEditPlus()) + if (IsOmniGen() || IsQwenImageEditPlus() || IsBoogu()) { imgNeg = neg; } @@ -803,7 +803,7 @@ void makeRefLatent(JArray image) } if (img is not null) { - if (IsQwenImageEditPlus()) + if (IsQwenImageEditPlus() || IsBoogu()) { neg = imgNeg; } @@ -2525,28 +2525,6 @@ public JArray CreateConditioningLine(string prompt, JArray clip, T2IModel model, return first; } - /// Creates a "TextEncodeBooguEdit" node, which outputs both positive and negative conditioning. - public string CreateBooguEditConditioning(JArray clip, string id = null) - { - JObject inputs = new() - { - ["clip"] = clip, - ["prompt"] = UserInput.Get(T2IParamTypes.Prompt, ""), - ["negative_prompt"] = UserInput.Get(T2IParamTypes.NegativePrompt, ""), - ["vae"] = CurrentVae.Path - }; - for (int i = 0; i < 16; i++) - { - JArray img = GetPromptImage(true, true, i); - if (img is null) - { - break; - } - inputs[$"images.image_{i + 1}"] = img; - } - return CreateNode("TextEncodeBooguEdit", inputs, id); - } - public record struct RegionHelper(JArray PartCond, JArray Mask); public bool ShouldZeroNegative() @@ -2664,6 +2642,26 @@ public WGNodeData CreatePixelDecode(T2IModel pidModel, WGNodeData media, WGNodeD /// Creates a "CLIPTextEncode" or equivalent node for the given input, applying prompt-given conditioning modifiers as relevant. public JArray CreateConditioning(string prompt, JArray clip, T2IModel model, bool isPositive, string firstId = null, bool isRefiner = false, bool isVideo = false, bool isVideoSwap = false, bool isPixelDecoder = false) { + if (IsBooguEdit() && isPositive) + { + JObject booguInputs = new() + { + ["clip"] = clip, + ["prompt"] = UserInput.Get(T2IParamTypes.Prompt, ""), + ["negative_prompt"] = "", + ["vae"] = null + }; + for (int i = 0; i < 16; i++) + { + JArray img = GetPromptImage(true, true, i); + if (img is null) + { + break; + } + booguInputs[$"images.image_{i + 1}"] = img; + } + return [CreateNode("TextEncodeBooguEdit", booguInputs, firstId), 0]; + } PromptRegion regionalizer = new(prompt); string globalPromptText = regionalizer.GlobalPrompt; if (isVideoSwap && !string.IsNullOrWhiteSpace(regionalizer.VideoSwapPrompt)) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs index 3cdd2176d..f7c974cc0 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs @@ -579,16 +579,7 @@ public static void Register() #region Positive Prompt AddStep(g => { - if (g.IsBooguEdit()) - { - string booguEdit = g.CreateBooguEditConditioning(g.CurrentTextEnc.Path, "6"); - g.FinalPrompt = [booguEdit, 0]; - g.FinalNegativePrompt = [booguEdit, 1]; - } - else - { - g.FinalPrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.Prompt), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), true, "6"); - } + g.FinalPrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.Prompt), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), true, "6"); }, -8); #endregion #region ReVision/UnCLIP/IPAdapter @@ -990,10 +981,7 @@ void requireLora(string name, string url, string hash) #region Negative Prompt AddStep(g => { - if (!g.IsBooguEdit()) - { - g.FinalNegativePrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.NegativePrompt, ""), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), false, "7"); - } + g.FinalNegativePrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.NegativePrompt, ""), g.CurrentTextEnc.Path, g.UserInput.Get(T2IParamTypes.Model), false, "7"); }, -7); #endregion #region ControlNet From 3bf264fdb4a8cbf021aceb6f9215e93a9ece8992 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 18 Jun 2026 07:22:49 -0600 Subject: [PATCH 11/16] Allow user to override sigma shift --- .../ComfyUIBackend/WorkflowGeneratorModelSupport.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index 3d9cae829..f4e16f699 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -1133,6 +1133,16 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) { helpers.LoadClip("boogu", helpers.GetQwen3vl_8bModel()); helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFluxVAE, "flux-1", "flux-ae"); + double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3.16, sectionId: sectionId); + if (shift > 0) + { + string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() + { + ["model"] = LoadingModel, + ["shift"] = shift + }); + LoadingModel = [samplingNode, 0]; + } } else if (IsFlux() && (LoadingClip is null || LoadingVAE is null || UserInput.Get(T2IParamTypes.T5XXLModel) is not null || UserInput.Get(T2IParamTypes.ClipLModel) is not null)) { From cb6f50f0399b3044101ae0a7d008c6cd6dcd49e2 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Thu, 18 Jun 2026 08:25:39 -0600 Subject: [PATCH 12/16] Sigma shift override only on boogu edit --- .../ComfyUIBackend/WorkflowGeneratorModelSupport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index f4e16f699..1f49b94ba 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -1134,7 +1134,7 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) helpers.LoadClip("boogu", helpers.GetQwen3vl_8bModel()); helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFluxVAE, "flux-1", "flux-ae"); double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3.16, sectionId: sectionId); - if (shift > 0) + if (IsBooguEdit() && shift > 0) { string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() { From da9cc39d48f7442993d250bb0f47582067f8c674 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 22 Jun 2026 06:53:39 -0600 Subject: [PATCH 13/16] Move the Boogu edit stuff where it belongs and let the fancy prompt encoder kick in when it should --- .../ComfyUIBackend/WorkflowGenerator.cs | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs index c92804e9d..80f9d1627 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs @@ -2414,6 +2414,26 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode }, id); } } + else if (IsBooguEdit() && isPositive && !wantsSwarmCustom) + { + JObject booguInputs = new() + { + ["clip"] = clip, + ["prompt"] = prompt, + ["negative_prompt"] = "", + ["vae"] = null + }; + for (int i = 0; i < 16; i++) + { + JArray img = GetPromptImage(true, true, i); + if (img is null) + { + break; + } + booguInputs[$"images.image_{i + 1}"] = img; + } + node = CreateNode("TextEncodeBooguEdit", booguInputs, id); + } else if (IsHunyuanVideoI2V() && prompt.StartsWith("'); @@ -2642,26 +2662,6 @@ public WGNodeData CreatePixelDecode(T2IModel pidModel, WGNodeData media, WGNodeD /// Creates a "CLIPTextEncode" or equivalent node for the given input, applying prompt-given conditioning modifiers as relevant. public JArray CreateConditioning(string prompt, JArray clip, T2IModel model, bool isPositive, string firstId = null, bool isRefiner = false, bool isVideo = false, bool isVideoSwap = false, bool isPixelDecoder = false) { - if (IsBooguEdit() && isPositive) - { - JObject booguInputs = new() - { - ["clip"] = clip, - ["prompt"] = UserInput.Get(T2IParamTypes.Prompt, ""), - ["negative_prompt"] = "", - ["vae"] = null - }; - for (int i = 0; i < 16; i++) - { - JArray img = GetPromptImage(true, true, i); - if (img is null) - { - break; - } - booguInputs[$"images.image_{i + 1}"] = img; - } - return [CreateNode("TextEncodeBooguEdit", booguInputs, firstId), 0]; - } PromptRegion regionalizer = new(prompt); string globalPromptText = regionalizer.GlobalPrompt; if (isVideoSwap && !string.IsNullOrWhiteSpace(regionalizer.VideoSwapPrompt)) From 0ed3ff151815f675887c6f0dc8b5f509514b72c0 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 22 Jun 2026 07:05:27 -0600 Subject: [PATCH 14/16] Update docs --- docs/Model Support.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Model Support.md b/docs/Model Support.md index d445a8a3b..c49ad9e22 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -668,15 +668,15 @@ For upscaling with SD3, the `Refiner Do Tiling` parameter is highly recommended # Boogu - [Boogu]() is supported in SwarmUI! -- It is a 10B model, with a base model and an official turbo distill designed to run fast, and edit model. - - Base: [Comfy-Org/Boogu-Image - Base FP8]() - - Edit: [Comfy-Org/Boogu-Image - Edit FP8]() +- It is a 10B model that comes in three separate variants - **Base**, **Edit**, and **Turbo**: + - **Base**: [Comfy-Org/Boogu-Image - Base FP8]() + - **Edit** - image editing, takes a prompt image as a reference: [Comfy-Org/Boogu-Image - Edit FP8]() - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Edit nvfp4]() - - Turbo: [Comfy-Org/Boogu-Image - Turbo FP8]() + - **Turbo** - very fast, low step counts: [Comfy-Org/Boogu-Image - Turbo FP8]() - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Turbo nvfp4]() - Uses the Flux.1 VAE and a Qwen3-VL text encoder, both downloaded and handled automatically. - For editing, use the `Edit` model and give it a prompt image - SwarmUI automatically wires it in as the reference. -- **Parameters:** +- **Parameters:** recommendations differ between the Base, Edit, and Turbo models: - **Sampler**: For Turbo, use LCM, otherwise DPM++ 2M is fine. - **Scheduler:** For Turbo, use SGM Uniform, otherwise default is fine. - **CFG Scale:** For Turbo, `1`, otherwise normal CFG ranges (around `5`). From f265c8bb9619548bd8c4359c4b94fbc07469a0ce Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 22 Jun 2026 07:10:40 -0600 Subject: [PATCH 15/16] Sigma shift uses existing pattern --- .../ComfyUIBackend/WorkflowGeneratorModelSupport.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index 1f49b94ba..ffa79cc74 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -1133,16 +1133,6 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) { helpers.LoadClip("boogu", helpers.GetQwen3vl_8bModel()); helpers.DoVaeLoader(UserInput.SourceSession?.User?.Settings?.VAEs?.DefaultFluxVAE, "flux-1", "flux-ae"); - double shift = UserInput.Get(T2IParamTypes.SigmaShift, 3.16, sectionId: sectionId); - if (IsBooguEdit() && shift > 0) - { - string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() - { - ["model"] = LoadingModel, - ["shift"] = shift - }); - LoadingModel = [samplingNode, 0]; - } } else if (IsFlux() && (LoadingClip is null || LoadingVAE is null || UserInput.Get(T2IParamTypes.T5XXLModel) is not null || UserInput.Get(T2IParamTypes.ClipLModel) is not null)) { @@ -1427,7 +1417,7 @@ public void LoadClip3(string type, string modelA, string modelB, string modelC) }); LoadingModel = [samplingNode, 0]; } - else if (IsZImage() || IsAceStep15() || IsAnima()) + else if (IsZImage() || IsAceStep15() || IsAnima() || IsBoogu()) { string samplingNode = CreateNode("ModelSamplingAuraFlow", new JObject() { From cc59a55e87452029e8b4dcb9fcab15371a26fcba Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Sun, 28 Jun 2026 16:11:57 -0700 Subject: [PATCH 16/16] docs and better edit handling --- docs/Model Support.md | 10 +++---- .../SwarmComfyCommon/SwarmTextHandling.py | 4 +-- .../ComfyUIBackend/WorkflowGenerator.cs | 30 ++----------------- .../WorkflowGeneratorModelSupport.cs | 3 -- 4 files changed, 10 insertions(+), 37 deletions(-) diff --git a/docs/Model Support.md b/docs/Model Support.md index c072c50d1..0e510cf87 100644 --- a/docs/Model Support.md +++ b/docs/Model Support.md @@ -697,21 +697,21 @@ For upscaling with SD3, the `Refiner Do Tiling` parameter is highly recommended # Boogu - [Boogu]() is supported in SwarmUI! -- It is a 10B model that comes in three separate variants - **Base**, **Edit**, and **Turbo**: +- It is a 10B model, derived from OmniGen, that comes in three separate variants - **Base**, **Edit**, and **Turbo**: - **Base**: [Comfy-Org/Boogu-Image - Base FP8]() - **Edit** - image editing, takes a prompt image as a reference: [Comfy-Org/Boogu-Image - Edit FP8]() - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Edit nvfp4]() - **Turbo** - very fast, low step counts: [Comfy-Org/Boogu-Image - Turbo FP8]() - Or the NVFP4 (6 gigs) here: [Comfy-Org/Boogu-Image - Turbo nvfp4]() -- Uses the Flux.1 VAE and a Qwen3-VL text encoder, both downloaded and handled automatically. +- Uses the Flux.1 VAE and a Qwen3-VL8B text encoder, both downloaded and handled automatically. - For editing, use the `Edit` model and give it a prompt image - SwarmUI automatically wires it in as the reference. - **Parameters:** recommendations differ between the Base, Edit, and Turbo models: - - **Sampler**: For Turbo, use LCM, otherwise DPM++ 2M is fine. + - **Sampler**: For Turbo, use LCM, otherwise default is fine, DPM++ 2M is recommended as a bit better than Euler for these models. - **Scheduler:** For Turbo, use SGM Uniform, otherwise default is fine. - - **CFG Scale:** For Turbo, `1`, otherwise normal CFG ranges (around `5`). + - **CFG Scale:** For Turbo, `1`, otherwise normal CFG ranges (around `4`). - **Steps:** For Turbo, `4` is recommended, otherwise `20` as normal. - **Resolution:** Side length `1024` is the default. - - **Sigma Shift:** For Edit default is `3.16`, handled automatically. + - **Sigma Shift:** Default is `3.16`. # Video Models diff --git a/src/BuiltinExtensions/ComfyUIBackend/ExtraNodes/SwarmComfyCommon/SwarmTextHandling.py b/src/BuiltinExtensions/ComfyUIBackend/ExtraNodes/SwarmComfyCommon/SwarmTextHandling.py index 95e77c997..bc946bfb9 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/ExtraNodes/SwarmComfyCommon/SwarmTextHandling.py +++ b/src/BuiltinExtensions/ComfyUIBackend/ExtraNodes/SwarmComfyCommon/SwarmTextHandling.py @@ -70,7 +70,7 @@ def encode(self, clip, steps: int, prompt: str, width: int, height: int, target_ def tokenize(text: str): nonlocal images if clip_vision_output is not None: - return clip.tokenize(text, llama_template=llama_template, image_embeds=clip_vision_output.mm_projected) + return clip.tokenize(text, llama_template=llama_template if llama_template else None, image_embeds=clip_vision_output.mm_projected) elif images is not None: if append_images: image_prompt = "" @@ -83,7 +83,7 @@ def tokenize(text: str): text = image_prompt + text else: text = text + image_prompt - return clip.tokenize(text, llama_template=llama_template, images=images) + return clip.tokenize(text, llama_template=llama_template if llama_template else None, images=images) else: return clip.tokenize(text) diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs index e729e57a8..a0ea4dca5 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGenerator.cs @@ -972,10 +972,6 @@ public string CreateKSampler(JArray model, JArray pos, JArray neg, JArray latent } else if (IsBoogu()) { - if (IsBooguEdit()) - { - defsampler ??= "dpmpp_2m"; - } defscheduler ??= "simple"; } // TODO: Registry of model default preferences instead of this @@ -1309,7 +1305,7 @@ public JArray GetPromptImage(bool fixSize, bool promptSize = false, int index = doesFit = false; } } - else if (IsQwenImageEditPlus() && promptSize) + else if ((IsBoogu() || IsQwenImageEditPlus()) && promptSize) { target = 384; doesFit = false; @@ -2353,7 +2349,7 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode ["text"] = prompt }, id); } - else if (IsIdeogram4() || IsKrea2()) + else if (IsIdeogram4() || IsKrea2() || (IsBoogu() && isPositive)) { JArray imageNode = GetPromptImage(true, true, 0); for (int i = 1; i < 10; i++) @@ -2381,7 +2377,7 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode ["target_height"] = height, ["guidance"] = UserInput.Get(T2IParamTypes.FluxGuidanceScale, defaultGuidance), ["images"] = imageNode, - ["llama_template"] = "krea2" // TODO: Ideogram preferred template? + ["llama_template"] = IsBoogu() ? null : "krea2" // TODO: Ideogram preferred template? }, id); } else if (IsQwenImageEdit() && (isPositive || IsQwenImageEditPlus()) && (qwenImage = GetPromptImage(true, true)) is not null) @@ -2445,26 +2441,6 @@ public JArray CreateConditioningDirect(string prompt, JArray clip, T2IModel mode }, id); } } - else if (IsBooguEdit() && isPositive && !wantsSwarmCustom) - { - JObject booguInputs = new() - { - ["clip"] = clip, - ["prompt"] = prompt, - ["negative_prompt"] = "", - ["vae"] = null - }; - for (int i = 0; i < 16; i++) - { - JArray img = GetPromptImage(true, true, i); - if (img is null) - { - break; - } - booguInputs[$"images.image_{i + 1}"] = img; - } - node = CreateNode("TextEncodeBooguEdit", booguInputs, id); - } else if (IsHunyuanVideoI2V() && prompt.StartsWith("'); diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs index 54be576e9..97ba2aa02 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorModelSupport.cs @@ -160,9 +160,6 @@ public bool IsQwenImageEditPlus() /// Returns true if the current model is Boogu. public bool IsBoogu() => IsModelCompatClass(T2IModelClassSorter.CompatBoogu); - /// Returns true if the current model is Boogu and has a prompt image (consider it edit model). - public bool IsBooguEdit() => IsBoogu() && UserInput.TryGet(T2IParamTypes.PromptImages, out List images) && images.Count > 0; - /// Returns true if the current model is Hunyuan Video (original / v1). public bool IsHunyuanVideo() => IsModelCompatClass(T2IModelClassSorter.CompatHunyuanVideo);