From a7705f39b83fbaf47ddd5a2bd72066528d41c595 Mon Sep 17 00:00:00 2001 From: InformEthics Date: Wed, 27 Nov 2024 23:57:13 +0000 Subject: [PATCH] Update Mflux_Air.py Updated Quick Mflux Generation with img2img instead image input for more clarity and updated the class image from image to img2img --- Mflux_Comfy/Mflux_Air.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Mflux_Comfy/Mflux_Air.py b/Mflux_Comfy/Mflux_Air.py index 3d276ef..f8d1d81 100644 --- a/Mflux_Comfy/Mflux_Air.py +++ b/Mflux_Comfy/Mflux_Air.py @@ -137,7 +137,7 @@ class QuickMfluxNode: }, "optional": { "Local_model": ("PATH",), - "image": ("MfluxImagePipeline",), + "img2img": ("MfluxImg2ImgPipeline",), "Loras": ("MfluxLorasPipeline",), "ControlNet": ("MfluxControlNetPipeline",), }, @@ -151,13 +151,13 @@ class QuickMfluxNode: CATEGORY = "MFlux/Air" FUNCTION = "generate" - def generate(self, prompt, model, seed, width, height, steps, guidance, quantize="None", metadata=True, Local_model="", image=None, Loras=None, ControlNet=None, full_prompt=None, extra_pnginfo=None): + def generate(self, prompt, model, seed, width, height, steps, guidance, quantize="None", metadata=True, Local_model="", img2img=None, Loras=None, ControlNet=None, full_prompt=None, extra_pnginfo=None): generated_images = generate_image( - prompt, model, seed, width, height, steps, guidance, quantize, metadata, Local_model, image, Loras, ControlNet + prompt, model, seed, width, height, steps, guidance, quantize, metadata, Local_model, img2img, Loras, ControlNet ) - image_path = image.image_path if image else None - strength = image.strength if image else None + image_path = img2img.image_path if img2img else None + image_strength = img2img.image_strength if img2img else None lora_paths, lora_scales = get_lora_info(Loras) if metadata: @@ -173,7 +173,7 @@ class QuickMfluxNode: "steps": steps, "guidance": guidance, "image_path": image_path, - "strength": strength, + "image_strength": image_strength, "lora_paths": lora_paths, "lora_scales": lora_scales, "filename_prefix": "Mflux", @@ -184,4 +184,4 @@ class QuickMfluxNode: result = save_images_with_metadata(**save_images_params) counter = result["counter"] - return generated_images \ No newline at end of file + return generated_images