Linoy Tsaban commited on
Commit
4032190
·
1 Parent(s): 49ab968

Update pipeline_semantic_stable_diffusion_xl_img2img_ddpm.py

Browse files
pipeline_semantic_stable_diffusion_xl_img2img_ddpm.py CHANGED
@@ -829,7 +829,7 @@ class SemanticStableDiffusionXLImg2ImgPipeline_DDPMInversion(DiffusionPipeline,
829
  prompt_2: Optional[Union[str, List[str]]] = None,
830
  height: Optional[int] = None,
831
  width: Optional[int] = None,
832
- #num_inference_steps: int = 50,
833
  #denoising_end: Optional[float] = None,
834
  guidance_scale: float = 5.0,
835
  negative_prompt: Optional[Union[str, List[str]]] = None,
@@ -1011,7 +1011,7 @@ class SemanticStableDiffusionXLImg2ImgPipeline_DDPMInversion(DiffusionPipeline,
1011
  `tuple`. When returning a tuple, the first element is a list with the generated images.
1012
  """
1013
  # eta = self.eta
1014
- num_inference_steps = self.num_inversion_steps
1015
  num_images_per_prompt = 1
1016
  # latents = self.init_latents
1017
 
@@ -1023,10 +1023,15 @@ class SemanticStableDiffusionXLImg2ImgPipeline_DDPMInversion(DiffusionPipeline,
1023
  self.smoothing = GaussianSmoothing(self.device)
1024
 
1025
  # 0. Default height and width to unet
1026
- height = self.height
1027
- width = self.width
1028
- original_size = self.original_size
1029
- target_size = self.target_size
 
 
 
 
 
1030
 
1031
  # 1. Check inputs. Raise error if not correct
1032
  self.check_inputs(
 
829
  prompt_2: Optional[Union[str, List[str]]] = None,
830
  height: Optional[int] = None,
831
  width: Optional[int] = None,
832
+ num_inference_steps: int = 50,
833
  #denoising_end: Optional[float] = None,
834
  guidance_scale: float = 5.0,
835
  negative_prompt: Optional[Union[str, List[str]]] = None,
 
1011
  `tuple`. When returning a tuple, the first element is a list with the generated images.
1012
  """
1013
  # eta = self.eta
1014
+ # num_inference_steps = self.num_inversion_steps
1015
  num_images_per_prompt = 1
1016
  # latents = self.init_latents
1017
 
 
1023
  self.smoothing = GaussianSmoothing(self.device)
1024
 
1025
  # 0. Default height and width to unet
1026
+ # height = self.height
1027
+ # width = self.width
1028
+ # original_size = self.original_size
1029
+ # target_size = self.target_size
1030
+
1031
+ height = height or self.default_sample_size * self.vae_scale_factor
1032
+ width = width or self.default_sample_size * self.vae_scale_factor
1033
+ original_size = original_size or (height, width)
1034
+ target_size = target_size or (height, width)
1035
 
1036
  # 1. Check inputs. Raise error if not correct
1037
  self.check_inputs(