The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Add negative prompt to boogu edit node and set min images to 0. (#14529)
comfyanonymous52257bb43516
diff --git a/comfy/supported_models.py b/comfy/supported_models.pyindex d78b6ae87..cc05908ee 100644--- a/comfy/supported_models.py+++ b/comfy/supported_models.py@@ -1769,7 +1769,7 @@ class Boogu(Omnigen2):"shift": 3.16,}- memory_usage_factor = 1.95 #TODO+ memory_usage_factor = 2.15def get_model(self, state_dict, prefix="", device=None):out = model_base.Boogu(self, device=device)diff --git a/comfy_extras/nodes_boogu.py b/comfy_extras/nodes_boogu.pyindex 590623e12..f3951c290 100644--- a/comfy_extras/nodes_boogu.py+++ b/comfy_extras/nodes_boogu.py@@ -26,13 +26,14 @@ class TextEncodeBooguEdit(io.ComfyNode):inputs=[io.Clip.Input("clip"),io.String.Input("prompt", multiline=True, dynamic_prompts=True),+ io.String.Input("negative_prompt", multiline=True, dynamic_prompts=True, advanced=True),io.Vae.Input("vae"),io.Autogrow.Input("images",template=io.Autogrow.TemplateNames(io.Image.Input("image"),names=[f"image_{i}" for i in range(1, 17)],- min=1,+ min=0,),tooltip="Reference image(s) to edit. Boogu focuses on one reference per sample; more are allowed.",),@@ -44,7 +45,7 @@ class TextEncodeBooguEdit(io.ComfyNode):)@classmethod- def execute(cls, clip, prompt, vae=None, images: io.Autogrow.Type = None) -> io.NodeOutput:+ def execute(cls, clip, prompt, negative_prompt, vae=None, images: io.Autogrow.Type = None) -> io.NodeOutput:ref_latents = []images_vl = []@@ -75,7 +76,7 @@ class TextEncodeBooguEdit(io.ComfyNode):# positive: instruction + vision tokens; negative: empty (no vision). Ref latent on both.positive = clip.encode_from_tokens_scheduled(clip.tokenize(prompt, images=images_vl))- negative = clip.encode_from_tokens_scheduled(clip.tokenize(""))+ negative = clip.encode_from_tokens_scheduled(clip.tokenize(negative_prompt))if len(ref_latents) > 0:positive = node_helpers.conditioning_set_values(positive, {"reference_latents": ref_latents}, append=True)