Transform your 3D texturing workflow with the power of generative AI, directly within Blender!
fix flux ipadapter not working with the regenerate first image option
sakalond49c81948a854
diff --git a/stablegen/generator.py b/stablegen/generator.pyindex 766ad41..9a843b1 100644--- a/stablegen/generator.py+++ b/stablegen/generator.py@@ -653,10 +653,16 @@ class ComfyUIGenerate(bpy.types.Operator):self._stage = "Generating Image"context.scene.use_ipadapter = Truecontext.scene.ipadapter_image = image_path- if context.scene.generation_method == "refine":- image = self.refine(context, depth_path=depth_path, render_path=render_path, mask_path=mask_path, canny_path=canny_path, normal_path=normal_path)- else:- image = self.generate(context, depth_path=depth_path, canny_path=canny_path, normal_path=normal_path)+ if context.scene.model_architecture == "sdxl":+ if context.scene.generation_method == "refine":+ image = self.refine(context, depth_path=depth_path, render_path=render_path, mask_path=mask_path, canny_path=canny_path, normal_path=normal_path)+ else:+ image = self.generate(context, depth_path=depth_path, canny_path=canny_path, normal_path=normal_path)+ elif context.scene.model_architecture == "flux1":+ if context.scene.generation_method == "refine":+ image = self.refine_flux(context, depth_path=depth_path, render_path=render_path, mask_path=mask_path, canny_path=canny_path, normal_path=normal_path)+ else:+ image = self.generate_flux(context, depth_path=depth_path, canny_path=canny_path, normal_path=normal_path)context.scene.use_ipadapter = Falseimage_path = image_path.replace(".png", "_ipadapter.png")with open(image_path, 'wb') as f: