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
This commit is contained in:
InformEthics
2024-11-27 23:57:13 +00:00
committed by GitHub
parent 3260889ee5
commit a7705f39b8
+7 -7
View File
@@ -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
return generated_images