diff --git a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs index d58c66311..c86f3dcf7 100644 --- a/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs +++ b/src/BuiltinExtensions/ComfyUIBackend/WorkflowGeneratorSteps.cs @@ -1766,6 +1766,21 @@ JArray doMaskShrinkApply(WorkflowGenerator g, JArray imgIn) }, "26"); g.CurrentMedia = g.CurrentMedia.WithPath(["26", 0], WGNodeData.DT_LATENT_VIDEO); } + else if (g.IsMiniMaxH3Image()) + { + int precision = T2IModelClassSorter.CompatMiniMaxH3Image.ResolutionPrecision; + width = Math.Max(precision, width / precision * precision); + height = Math.Max(precision, height / precision * precision); + g.CurrentMedia = g.CurrentMedia.AsLatentImage(g.CurrentVae); + g.CreateNode("MiniMaxH3LatentUpscaleWithModel", new JObject() + { + ["model"] = NodePath("27", 0), + ["samples"] = g.CurrentMedia.Path, + ["width"] = width, + ["height"] = height + }, "26"); + g.CurrentMedia = g.CurrentMedia.WithPath(["26", 0]); + } else { throw new SwarmUserErrorException($"Cannot latent-upscale with a model for {g.CurrentCompatClass()}, check your Refiner Upscale Method parameter");