From e458e620ef0db7c5b97da84a1d80ee75513f5c5e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 28 Mar 2024 10:22:08 -0400 Subject: [PATCH] fix instantid --- CHANGELOG.md | 3 ++- modules/control/units/xs_pipe.py | 8 +------- modules/face/instantid_model.py | 4 +++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f19fd6e83..11d9990d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Control API scripts compatibility -## Update for 2024-03-27 +## Update for 2024-03-28 - **Features**: - **Gallery**: list, preview, search through all your images and videos! @@ -36,6 +36,7 @@ - Fix image save without metadata - fix ROCm compatibility, thanks @Disty0 - Fix API generate save metadata + - Fix Face/InstantID - Enumerate diffusers model with multiple variants ## Update for 2024-03-19 diff --git a/modules/control/units/xs_pipe.py b/modules/control/units/xs_pipe.py index d445a2892..14581c0f1 100644 --- a/modules/control/units/xs_pipe.py +++ b/modules/control/units/xs_pipe.py @@ -1222,9 +1222,6 @@ class StableDiffusionControlNetXSPipeline( lora_scale: Optional[float] = None, **kwargs, ): - deprecation_message = "`_encode_prompt()` is deprecated and it will be removed in a future version. Use `encode_prompt()` instead. Also, be aware that the output format changed from a concatenated tensor to a tuple." - deprecate("_encode_prompt()", "1.0.0", deprecation_message, standard_warn=False) - prompt_embeds_tuple = self.encode_prompt( prompt=prompt, device=device, @@ -1441,9 +1438,6 @@ class StableDiffusionControlNetXSPipeline( # Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.decode_latents def decode_latents(self, latents): - deprecation_message = "The decode_latents method is deprecated and will be removed in 1.0.0. Please use VaeImageProcessor.postprocess(...) instead" - deprecate("decode_latents", "1.0.0", deprecation_message, standard_warn=False) - latents = 1 / self.vae.config.scaling_factor * latents image = self.vae.decode(latents, return_dict=False)[0] image = (image / 2 + 0.5).clamp(0, 1) @@ -1935,4 +1929,4 @@ class StableDiffusionControlNetXSPipeline( if not return_dict: return (image, has_nsfw_concept) - return StableDiffusionPipelineOutput(images=image, nsfw_content_detected=has_nsfw_concept) + return StableDiffusionXLPipelineOutput(images=image) diff --git a/modules/face/instantid_model.py b/modules/face/instantid_model.py index 7f70aff98..51a4d7850 100644 --- a/modules/face/instantid_model.py +++ b/modules/face/instantid_model.py @@ -26,7 +26,7 @@ from diffusers import StableDiffusionXLControlNetPipeline from diffusers.image_processor import PipelineImageInput from diffusers.models import ControlNetModel from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel -from diffusers.pipelines.stable_diffusion_xl import StableDiffusionXLPipelineOutput +from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput from diffusers.utils import ( deprecate, logging, @@ -746,6 +746,7 @@ class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipeline): ) # 1. Check inputs. Raise error if not correct + """ self.check_inputs( prompt, prompt_2, @@ -762,6 +763,7 @@ class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipeline): control_guidance_end, callback_on_step_end_tensor_inputs, ) + """ self._guidance_scale = guidance_scale self._clip_skip = clip_skip