From 72c48db5f0245339b0a90f0f1f57a6959f10b74d Mon Sep 17 00:00:00 2001 From: Dongxu Li Date: Tue, 20 Jun 2023 01:43:17 +0000 Subject: [PATCH] minor. --- lavis/models/blip_diffusion_models/blip_diffusion.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lavis/models/blip_diffusion_models/blip_diffusion.py b/lavis/models/blip_diffusion_models/blip_diffusion.py index c83579026..5f8ba1e12 100644 --- a/lavis/models/blip_diffusion_models/blip_diffusion.py +++ b/lavis/models/blip_diffusion_models/blip_diffusion.py @@ -281,19 +281,18 @@ def _inversion_transform(self, image, target_size=512): def edit( self, samples, - latents=None, guidance_scale=7.5, height=512, width=512, seed=42, num_inference_steps=50, + num_inversion_steps=50, neg_prompt="", ): raw_image = samples["raw_image"] raw_image = self._inversion_transform(raw_image) - if latents is None: - latents = self.get_image_latents(raw_image, rng_generator=None) + latents = self.get_image_latents(raw_image, rng_generator=None) latents = self._ddim_inverse( samples=samples, @@ -302,7 +301,7 @@ def edit( guidance_scale=1.0, height=height, width=width, - num_inference_steps=num_inference_steps, + num_inference_steps=num_inversion_steps, ) recon_image = self.generate_then_edit(