Datasets:

ArXiv:
diffusers-benchmarking-bot commited on
Commit
4db6cea
·
verified ·
1 Parent(s): a240ae1

Upload folder using huggingface_hub

Browse files
main/adaptive_mask_inpainting.py CHANGED
@@ -1103,7 +1103,7 @@ class AdaptiveMaskInpaintPipeline(
1103
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
1104
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
1105
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
1106
- f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
1107
  " `pipeline.unet` or your `default_mask_image` or `image` input."
1108
  )
1109
  elif num_channels_unet != 4:
 
1103
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
1104
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
1105
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
1106
+ f" = {num_channels_latents + num_channels_masked_image + num_channels_mask}. Please verify the config of"
1107
  " `pipeline.unet` or your `default_mask_image` or `image` input."
1108
  )
1109
  elif num_channels_unet != 4:
main/hd_painter.py CHANGED
@@ -686,7 +686,7 @@ class StableDiffusionHDPainterPipeline(StableDiffusionInpaintPipeline):
686
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
687
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
688
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
689
- f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
690
  " `pipeline.unet` or your `mask_image` or `image` input."
691
  )
692
  elif num_channels_unet != 4:
 
686
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
687
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
688
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
689
+ f" = {num_channels_latents + num_channels_masked_image + num_channels_mask}. Please verify the config of"
690
  " `pipeline.unet` or your `mask_image` or `image` input."
691
  )
692
  elif num_channels_unet != 4:
main/img2img_inpainting.py CHANGED
@@ -362,7 +362,7 @@ class ImageToImageInpaintingPipeline(DiffusionPipeline):
362
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
363
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
364
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
365
- f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
366
  " `pipeline.unet` or your `mask_image` or `image` input."
367
  )
368
 
 
362
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
363
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
364
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
365
+ f" = {num_channels_latents + num_channels_masked_image + num_channels_mask}. Please verify the config of"
366
  " `pipeline.unet` or your `mask_image` or `image` input."
367
  )
368
 
main/llm_grounded_diffusion.py CHANGED
@@ -1120,7 +1120,7 @@ class LLMGroundedDiffusionPipeline(
1120
 
1121
  if verbose:
1122
  logger.info(
1123
- f"time index {index}, loss: {loss.item()/loss_scale:.3f} (de-scaled with scale {loss_scale:.1f}), loss threshold: {loss_threshold:.3f}"
1124
  )
1125
 
1126
  try:
@@ -1184,7 +1184,7 @@ class LLMGroundedDiffusionPipeline(
1184
 
1185
  if verbose:
1186
  logger.info(
1187
- f"time index {index}, loss: {loss.item()/loss_scale:.3f}, loss threshold: {loss_threshold:.3f}, iteration: {iteration}"
1188
  )
1189
 
1190
  finally:
 
1120
 
1121
  if verbose:
1122
  logger.info(
1123
+ f"time index {index}, loss: {loss.item() / loss_scale:.3f} (de-scaled with scale {loss_scale:.1f}), loss threshold: {loss_threshold:.3f}"
1124
  )
1125
 
1126
  try:
 
1184
 
1185
  if verbose:
1186
  logger.info(
1187
+ f"time index {index}, loss: {loss.item() / loss_scale:.3f}, loss threshold: {loss_threshold:.3f}, iteration: {iteration}"
1188
  )
1189
 
1190
  finally:
main/mod_controlnet_tile_sr_sdxl.py CHANGED
@@ -701,7 +701,7 @@ class StableDiffusionXLControlNetTileSRPipeline(
701
  raise ValueError("`max_tile_size` cannot be None.")
702
  elif not isinstance(max_tile_size, int) or max_tile_size not in (1024, 1280):
703
  raise ValueError(
704
- f"`max_tile_size` has to be in 1024 or 1280 but is {max_tile_size} of type" f" {type(max_tile_size)}."
705
  )
706
  if tile_gaussian_sigma is None:
707
  raise ValueError("`tile_gaussian_sigma` cannot be None.")
 
701
  raise ValueError("`max_tile_size` cannot be None.")
702
  elif not isinstance(max_tile_size, int) or max_tile_size not in (1024, 1280):
703
  raise ValueError(
704
+ f"`max_tile_size` has to be in 1024 or 1280 but is {max_tile_size} of type {type(max_tile_size)}."
705
  )
706
  if tile_gaussian_sigma is None:
707
  raise ValueError("`tile_gaussian_sigma` cannot be None.")
main/pipeline_flux_differential_img2img.py CHANGED
@@ -488,7 +488,7 @@ class FluxDifferentialImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin):
488
  if padding_mask_crop is not None:
489
  if not isinstance(image, PIL.Image.Image):
490
  raise ValueError(
491
- f"The image should be a PIL image when inpainting mask crop, but is of type" f" {type(image)}."
492
  )
493
  if not isinstance(mask_image, PIL.Image.Image):
494
  raise ValueError(
@@ -496,7 +496,7 @@ class FluxDifferentialImg2ImgPipeline(DiffusionPipeline, FluxLoraLoaderMixin):
496
  f" {type(mask_image)}."
497
  )
498
  if output_type != "pil":
499
- raise ValueError(f"The output type should be PIL when inpainting mask crop, but is" f" {output_type}.")
500
 
501
  if max_sequence_length is not None and max_sequence_length > 512:
502
  raise ValueError(f"`max_sequence_length` cannot be greater than 512 but is {max_sequence_length}")
 
488
  if padding_mask_crop is not None:
489
  if not isinstance(image, PIL.Image.Image):
490
  raise ValueError(
491
+ f"The image should be a PIL image when inpainting mask crop, but is of type {type(image)}."
492
  )
493
  if not isinstance(mask_image, PIL.Image.Image):
494
  raise ValueError(
 
496
  f" {type(mask_image)}."
497
  )
498
  if output_type != "pil":
499
+ raise ValueError(f"The output type should be PIL when inpainting mask crop, but is {output_type}.")
500
 
501
  if max_sequence_length is not None and max_sequence_length > 512:
502
  raise ValueError(f"`max_sequence_length` cannot be greater than 512 but is {max_sequence_length}")
main/pipeline_prompt2prompt.py CHANGED
@@ -907,12 +907,12 @@ def create_controller(
907
 
908
  # reweight
909
  if edit_type == "reweight":
910
- assert (
911
- equalizer_words is not None and equalizer_strengths is not None
912
- ), "To use reweight edit, please specify equalizer_words and equalizer_strengths."
913
- assert len(equalizer_words) == len(
914
- equalizer_strengths
915
- ), "equalizer_words and equalizer_strengths must be of same length."
916
  equalizer = get_equalizer(prompts[1], equalizer_words, equalizer_strengths, tokenizer=tokenizer)
917
  return AttentionReweight(
918
  prompts,
 
907
 
908
  # reweight
909
  if edit_type == "reweight":
910
+ assert equalizer_words is not None and equalizer_strengths is not None, (
911
+ "To use reweight edit, please specify equalizer_words and equalizer_strengths."
912
+ )
913
+ assert len(equalizer_words) == len(equalizer_strengths), (
914
+ "equalizer_words and equalizer_strengths must be of same length."
915
+ )
916
  equalizer = get_equalizer(prompts[1], equalizer_words, equalizer_strengths, tokenizer=tokenizer)
917
  return AttentionReweight(
918
  prompts,
main/pipeline_sdxl_style_aligned.py CHANGED
@@ -1738,7 +1738,7 @@ class StyleAlignedSDXLPipeline(
1738
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
1739
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
1740
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
1741
- f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
1742
  " `pipeline.unet` or your `mask_image` or `image` input."
1743
  )
1744
  elif num_channels_unet != 4:
 
1738
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
1739
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
1740
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
1741
+ f" = {num_channels_latents + num_channels_masked_image + num_channels_mask}. Please verify the config of"
1742
  " `pipeline.unet` or your `mask_image` or `image` input."
1743
  )
1744
  elif num_channels_unet != 4:
main/pipeline_stable_diffusion_upscale_ldm3d.py CHANGED
@@ -689,7 +689,7 @@ class StableDiffusionUpscaleLDM3DPipeline(
689
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
690
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
691
  f" `num_channels_image`: {num_channels_image} "
692
- f" = {num_channels_latents+num_channels_image}. Please verify the config of"
693
  " `pipeline.unet` or your `image` input."
694
  )
695
 
 
689
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
690
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
691
  f" `num_channels_image`: {num_channels_image} "
692
+ f" = {num_channels_latents + num_channels_image}. Please verify the config of"
693
  " `pipeline.unet` or your `image` input."
694
  )
695
 
main/pipeline_stable_diffusion_xl_attentive_eraser.py CHANGED
@@ -1028,7 +1028,7 @@ class StableDiffusionXL_AE_Pipeline(
1028
  if padding_mask_crop is not None:
1029
  if not isinstance(image, PIL.Image.Image):
1030
  raise ValueError(
1031
- f"The image should be a PIL image when inpainting mask crop, but is of type" f" {type(image)}."
1032
  )
1033
  if not isinstance(mask_image, PIL.Image.Image):
1034
  raise ValueError(
@@ -1036,7 +1036,7 @@ class StableDiffusionXL_AE_Pipeline(
1036
  f" {type(mask_image)}."
1037
  )
1038
  if output_type != "pil":
1039
- raise ValueError(f"The output type should be PIL when inpainting mask crop, but is" f" {output_type}.")
1040
 
1041
  if ip_adapter_image is not None and ip_adapter_image_embeds is not None:
1042
  raise ValueError(
@@ -2050,7 +2050,7 @@ class StableDiffusionXL_AE_Pipeline(
2050
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
2051
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
2052
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
2053
- f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
2054
  " `pipeline.unet` or your `mask_image` or `image` input."
2055
  )
2056
  elif num_channels_unet != 4:
 
1028
  if padding_mask_crop is not None:
1029
  if not isinstance(image, PIL.Image.Image):
1030
  raise ValueError(
1031
+ f"The image should be a PIL image when inpainting mask crop, but is of type {type(image)}."
1032
  )
1033
  if not isinstance(mask_image, PIL.Image.Image):
1034
  raise ValueError(
 
1036
  f" {type(mask_image)}."
1037
  )
1038
  if output_type != "pil":
1039
+ raise ValueError(f"The output type should be PIL when inpainting mask crop, but is {output_type}.")
1040
 
1041
  if ip_adapter_image is not None and ip_adapter_image_embeds is not None:
1042
  raise ValueError(
 
2050
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
2051
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
2052
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
2053
+ f" = {num_channels_latents + num_channels_masked_image + num_channels_mask}. Please verify the config of"
2054
  " `pipeline.unet` or your `mask_image` or `image` input."
2055
  )
2056
  elif num_channels_unet != 4:
main/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py CHANGED
@@ -1578,7 +1578,7 @@ class StableDiffusionXLControlNetAdapterInpaintPipeline(
1578
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
1579
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
1580
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
1581
- f" = {num_channels_latents+num_channels_masked_image+num_channels_mask}. Please verify the config of"
1582
  " `pipeline.unet` or your `mask_image` or `image` input."
1583
  )
1584
  elif num_channels_unet != 4:
 
1578
  f"Incorrect configuration settings! The config of `pipeline.unet`: {self.unet.config} expects"
1579
  f" {self.unet.config.in_channels} but received `num_channels_latents`: {num_channels_latents} +"
1580
  f" `num_channels_mask`: {num_channels_mask} + `num_channels_masked_image`: {num_channels_masked_image}"
1581
+ f" = {num_channels_latents + num_channels_masked_image + num_channels_mask}. Please verify the config of"
1582
  " `pipeline.unet` or your `mask_image` or `image` input."
1583
  )
1584
  elif num_channels_unet != 4:
main/scheduling_ufogen.py CHANGED
@@ -288,8 +288,7 @@ class UFOGenScheduler(SchedulerMixin, ConfigMixin):
288
 
289
  if timesteps[0] >= self.config.num_train_timesteps:
290
  raise ValueError(
291
- f"`timesteps` must start before `self.config.train_timesteps`:"
292
- f" {self.config.num_train_timesteps}."
293
  )
294
 
295
  timesteps = np.array(timesteps, dtype=np.int64)
 
288
 
289
  if timesteps[0] >= self.config.num_train_timesteps:
290
  raise ValueError(
291
+ f"`timesteps` must start before `self.config.train_timesteps`: {self.config.num_train_timesteps}."
 
292
  )
293
 
294
  timesteps = np.array(timesteps, dtype=np.int64)