From a796482d10006880360588fc338b5b370fb97652 Mon Sep 17 00:00:00 2001 From: yuj Date: Sat, 4 Apr 2026 07:39:54 +0800 Subject: [PATCH] fix: add missing f-string prefixes across pipelines and schedulers Co-Authored-By: Claude Opus 4.6 (1M context) --- src/diffusers/pipelines/controlnet/pipeline_controlnet.py | 2 +- .../pipelines/controlnet/pipeline_controlnet_img2img.py | 2 +- .../pipelines/controlnet/pipeline_controlnet_inpaint.py | 2 +- .../controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py | 2 +- src/diffusers/pipelines/deepfloyd_if/pipeline_if.py | 2 +- src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py | 2 +- .../deepfloyd_if/pipeline_if_img2img_superresolution.py | 4 ++-- .../pipelines/deepfloyd_if/pipeline_if_inpainting.py | 2 +- .../deepfloyd_if/pipeline_if_inpainting_superresolution.py | 4 ++-- .../pipelines/deepfloyd_if/pipeline_if_superresolution.py | 4 ++-- .../deprecated/alt_diffusion/pipeline_alt_diffusion.py | 2 +- .../alt_diffusion/pipeline_alt_diffusion_img2img.py | 2 +- .../deprecated/controlnet_xs/pipeline_controlnet_xs.py | 2 +- .../pipeline_semantic_stable_diffusion.py | 2 +- .../pipeline_stable_diffusion_attend_and_excite.py | 2 +- .../pipeline_stable_diffusion_diffedit.py | 2 +- .../pipeline_stable_diffusion_gligen.py | 2 +- .../pipeline_stable_diffusion_gligen_text_image.py | 2 +- .../stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py | 2 +- .../pipeline_stable_diffusion_panorama.py | 2 +- .../stable_diffusion_safe/pipeline_stable_diffusion_safe.py | 2 +- .../stable_diffusion_variants/pipeline_cycle_diffusion.py | 2 +- .../pipeline_onnx_stable_diffusion_inpaint_legacy.py | 2 +- .../pipeline_stable_diffusion_inpaint_legacy.py | 2 +- .../pipeline_stable_diffusion_model_editing.py | 2 +- .../pipeline_stable_diffusion_paradigms.py | 2 +- .../pipeline_stable_diffusion_pix2pix_zero.py | 2 +- src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py | 2 +- .../pipeline_latent_consistency_text2img.py | 2 +- .../pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py | 2 +- src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py | 2 +- .../pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py | 2 +- src/diffusers/pipelines/pag/pipeline_pag_hunyuandit.py | 2 +- src/diffusers/pipelines/pag/pipeline_pag_sd.py | 2 +- src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py | 2 +- src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py | 2 +- src/diffusers/pipelines/pipeline_loading_utils.py | 2 +- .../stable_diffusion/pipeline_onnx_stable_diffusion.py | 2 +- .../pipeline_onnx_stable_diffusion_img2img.py | 2 +- .../pipeline_onnx_stable_diffusion_inpaint.py | 2 +- .../pipeline_onnx_stable_diffusion_upscale.py | 2 +- .../pipelines/stable_diffusion/pipeline_stable_diffusion.py | 2 +- .../pipeline_stable_diffusion_image_variation.py | 2 +- .../stable_diffusion/pipeline_stable_diffusion_img2img.py | 2 +- .../stable_diffusion/pipeline_stable_diffusion_inpaint.py | 2 +- .../pipeline_stable_diffusion_instruct_pix2pix.py | 2 +- .../t2i_adapter/pipeline_stable_diffusion_adapter.py | 2 +- src/diffusers/pipelines/wan/pipeline_wan_vace.py | 4 ++-- src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py | 4 ++-- 49 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/diffusers/pipelines/controlnet/pipeline_controlnet.py b/src/diffusers/pipelines/controlnet/pipeline_controlnet.py index 86fa135abff4..7689906ecbf8 100644 --- a/src/diffusers/pipelines/controlnet/pipeline_controlnet.py +++ b/src/diffusers/pipelines/controlnet/pipeline_controlnet.py @@ -236,7 +236,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py b/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py index f0cfabc66f25..e966d76e5045 100644 --- a/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +++ b/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py @@ -214,7 +214,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py b/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py index d34278d0086b..5c28b1bc87a6 100644 --- a/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +++ b/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py @@ -217,7 +217,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py b/src/diffusers/pipelines/controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py index 8882b561f0a1..80b73869857f 100644 --- a/src/diffusers/pipelines/controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py +++ b/src/diffusers/pipelines/controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py @@ -259,7 +259,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py index b8c70fc6528c..ccb4e6260b86 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py @@ -150,7 +150,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py index 3dadc63f4952..e16dfba6ca0f 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py @@ -174,7 +174,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py index 4839a0860462..55575904d88f 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py @@ -180,13 +180,13 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) if unet is not None and unet.config.in_channels != 6: logger.warning( - "It seems like you have loaded a checkpoint that shall not be used for super resolution from {unet.config._name_or_path} as it accepts {unet.config.in_channels} input channels instead of 6. Please make sure to pass a super resolution checkpoint as the `'unet'`: IFSuperResolutionPipeline.from_pretrained(unet=super_resolution_unet, ...)`." + f"It seems like you have loaded a checkpoint that shall not be used for super resolution from {unet.config._name_or_path} as it accepts {unet.config.in_channels} input channels instead of 6. Please make sure to pass a super resolution checkpoint as the `'unet'`: IFSuperResolutionPipeline.from_pretrained(unet=super_resolution_unet, ...)`." ) self.register_modules( diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py index 03a9d6f7c5e8..6035de8208ef 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py @@ -177,7 +177,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py index 841382ad9c63..0ef4959f2753 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py @@ -182,13 +182,13 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) if unet is not None and unet.config.in_channels != 6: logger.warning( - "It seems like you have loaded a checkpoint that shall not be used for super resolution from {unet.config._name_or_path} as it accepts {unet.config.in_channels} input channels instead of 6. Please make sure to pass a super resolution checkpoint as the `'unet'`: IFSuperResolutionPipeline.from_pretrained(unet=super_resolution_unet, ...)`." + f"It seems like you have loaded a checkpoint that shall not be used for super resolution from {unet.config._name_or_path} as it accepts {unet.config.in_channels} input channels instead of 6. Please make sure to pass a super resolution checkpoint as the `'unet'`: IFSuperResolutionPipeline.from_pretrained(unet=super_resolution_unet, ...)`." ) self.register_modules( diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py index 52ebebb6f9b4..2844c81d0497 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py @@ -138,13 +138,13 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) if unet is not None and unet.config.in_channels != 6: logger.warning( - "It seems like you have loaded a checkpoint that shall not be used for super resolution from {unet.config._name_or_path} as it accepts {unet.config.in_channels} input channels instead of 6. Please make sure to pass a super resolution checkpoint as the `'unet'`: IFSuperResolutionPipeline.from_pretrained(unet=super_resolution_unet, ...)`." + f"It seems like you have loaded a checkpoint that shall not be used for super resolution from {unet.config._name_or_path} as it accepts {unet.config.in_channels} input channels instead of 6. Please make sure to pass a super resolution checkpoint as the `'unet'`: IFSuperResolutionPipeline.from_pretrained(unet=super_resolution_unet, ...)`." ) self.register_modules( diff --git a/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py b/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py index 9fab42916e9e..52e5b3bda26c 100644 --- a/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py +++ b/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py @@ -249,7 +249,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py b/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py index b6cd51c6d203..c61abed9d763 100644 --- a/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py +++ b/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py @@ -277,7 +277,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/controlnet_xs/pipeline_controlnet_xs.py b/src/diffusers/pipelines/deprecated/controlnet_xs/pipeline_controlnet_xs.py index d3fe2488a922..3dc1437bb83f 100644 --- a/src/diffusers/pipelines/deprecated/controlnet_xs/pipeline_controlnet_xs.py +++ b/src/diffusers/pipelines/deprecated/controlnet_xs/pipeline_controlnet_xs.py @@ -174,7 +174,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py b/src/diffusers/pipelines/deprecated/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py index bb3009d238a4..7a4871223218 100644 --- a/src/diffusers/pipelines/deprecated/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py +++ b/src/diffusers/pipelines/deprecated/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py @@ -82,7 +82,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py b/src/diffusers/pipelines/deprecated/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py index 20240d07dfa5..101b58caad16 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py @@ -242,7 +242,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py b/src/diffusers/pipelines/deprecated/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py index ee8675678f2d..7bedd9c283ed 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py @@ -342,7 +342,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py b/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py index ce5d3397ed47..cc3e4eb1f12e 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py @@ -166,7 +166,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py b/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py index d72d12a64945..bfbd15d98b18 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py @@ -227,7 +227,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py b/src/diffusers/pipelines/deprecated/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py index 16b21dd66132..5d08b9c2b4d0 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py @@ -257,7 +257,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py b/src/diffusers/pipelines/deprecated/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py index 481c9c93ddde..4c2dfe8ba875 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py @@ -228,7 +228,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_safe/pipeline_stable_diffusion_safe.py b/src/diffusers/pipelines/deprecated/stable_diffusion_safe/pipeline_stable_diffusion_safe.py index 35c7f9b970b9..66a866f37ace 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_safe/pipeline_stable_diffusion_safe.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_safe/pipeline_stable_diffusion_safe.py @@ -122,7 +122,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py index dae5e600d773..7e2725172efd 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py @@ -210,7 +210,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) is_unet_version_less_0_9_0 = ( diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_onnx_stable_diffusion_inpaint_legacy.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_onnx_stable_diffusion_inpaint_legacy.py index f526dc419cea..448466c836c0 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_onnx_stable_diffusion_inpaint_legacy.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_onnx_stable_diffusion_inpaint_legacy.py @@ -133,7 +133,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py index 650695b604c1..9938141011ab 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py @@ -180,7 +180,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py index 851820c00aed..a3edfc0b480b 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py @@ -108,7 +108,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py index ea81be87a0f4..930c4e3fb7f1 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py @@ -132,7 +132,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py index 0955b6fe48a1..158fc066678c 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py @@ -350,7 +350,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py b/src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py index b908dd5dfe83..0ab5ae5b9d09 100644 --- a/src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py +++ b/src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py @@ -232,7 +232,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py b/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py index 60f59ec7f9d3..57762a11c4f8 100644 --- a/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py +++ b/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py @@ -204,7 +204,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py b/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py index 864f9feeb5aa..787d587e2101 100644 --- a/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py +++ b/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py @@ -364,7 +364,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py b/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py index 807c42d21bb4..f9edf7ef2307 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py @@ -244,7 +244,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py b/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py index ebc2e882868c..b0184e317912 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_inpaint.py @@ -218,7 +218,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pag/pipeline_pag_hunyuandit.py b/src/diffusers/pipelines/pag/pipeline_pag_hunyuandit.py index 15ac665acd2b..bb21360d51bf 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_hunyuandit.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_hunyuandit.py @@ -237,7 +237,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pag/pipeline_pag_sd.py b/src/diffusers/pipelines/pag/pipeline_pag_sd.py index 26ea717556c5..e7412029e700 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_sd.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_sd.py @@ -255,7 +255,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py b/src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py index 822483eca995..ee9940dd64e0 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py @@ -250,7 +250,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py b/src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py index 0f6fbbd9ae16..6276b6fe2f2d 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py @@ -282,7 +282,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/pipeline_loading_utils.py b/src/diffusers/pipelines/pipeline_loading_utils.py index b2564d25505e..a9e9307cbff5 100644 --- a/src/diffusers/pipelines/pipeline_loading_utils.py +++ b/src/diffusers/pipelines/pipeline_loading_utils.py @@ -999,7 +999,7 @@ def _maybe_raise_warning_for_inpainting(pipeline_class, pretrained_model_name_or " checkpoint: https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-inpainting instead or adapting your" f" checkpoint {pretrained_model_name_or_path} to the format of" " https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-inpainting. Note that we do not actively maintain" - " the {StableDiffusionInpaintPipelineLegacy} class and will likely remove it in version 1.0.0." + f" the {StableDiffusionInpaintPipelineLegacy} class and will likely remove it in version 1.0.0." ) deprecate("StableDiffusionInpaintPipelineLegacy", "1.0.0", deprecation_message, standard_warn=False) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py index 0f66ca909e7d..30b6f0a8d6ce 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py @@ -96,7 +96,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py index 2bb3eb6990e1..f325b9110148 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py @@ -149,7 +149,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py index 7e3416a33832..be85af137ee1 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py @@ -148,7 +148,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py index c721a4f2ffa0..df2e3c011b49 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py @@ -122,7 +122,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py index 42d62f53a20a..99cf33d1e407 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py @@ -250,7 +250,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py index 5974aea6b448..ece511e28929 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py @@ -100,7 +100,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py index abcd06a2bb3b..efc6c0761080 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py @@ -278,7 +278,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py index a3e09d1ed1ad..3294192d30ab 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py @@ -225,7 +225,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py index c89d593d57be..8f1fe9fca619 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py @@ -151,7 +151,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py b/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py index ffb877cfd0f6..f4e58ddf27d1 100644 --- a/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py +++ b/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py @@ -253,7 +253,7 @@ def __init__( if safety_checker is not None and feature_extractor is None: raise ValueError( - "Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" + f"Make sure to define a feature extractor when loading {self.__class__} if you want to use the safety" " checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead." ) diff --git a/src/diffusers/pipelines/wan/pipeline_wan_vace.py b/src/diffusers/pipelines/wan/pipeline_wan_vace.py index c016eec1b535..7d45ae7ee099 100644 --- a/src/diffusers/pipelines/wan/pipeline_wan_vace.py +++ b/src/diffusers/pipelines/wan/pipeline_wan_vace.py @@ -399,7 +399,7 @@ def check_inputs( if not (is_pil_image or is_list_of_pil_images or is_list_of_list_of_pil_images): raise ValueError( "`reference_images` has to be of type `PIL.Image.Image` or `list` of `PIL.Image.Image`, or " - "`list` of `list` of `PIL.Image.Image`, but is {type(reference_images)}" + f"`list` of `list` of `PIL.Image.Image`, but is {type(reference_images)}" ) if is_list_of_list_of_pil_images and len(reference_images) != 1: raise ValueError( @@ -474,7 +474,7 @@ def preprocess_conditions( else: raise ValueError( "`reference_images` has to be of type `PIL.Image.Image` or `list` of `PIL.Image.Image`, or " - "`list` of `list` of `PIL.Image.Image`, but is {type(reference_images)}" + f"`list` of `list` of `PIL.Image.Image`, but is {type(reference_images)}" ) if video.shape[0] != len(reference_images): diff --git a/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py b/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py index 002f2b844a52..e8adf3b61302 100644 --- a/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py +++ b/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py @@ -418,13 +418,13 @@ def set_timesteps( if not self.config.lower_order_final and num_inference_steps % self.config.solver_order != 0: logger.warning( - "Changing scheduler {self.config} to have `lower_order_final` set to True to handle uneven amount of inference steps. Please make sure to always use an even number of `num_inference steps when using `lower_order_final=False`." + f"Changing scheduler {self.config} to have `lower_order_final` set to True to handle uneven amount of inference steps. Please make sure to always use an even number of `num_inference steps when using `lower_order_final=False`." ) self.register_to_config(lower_order_final=True) if not self.config.lower_order_final and self.config.final_sigmas_type == "zero": logger.warning( - " `last_sigmas_type='zero'` is not supported for `lower_order_final=False`. Changing scheduler {self.config} to have `lower_order_final` set to True." + f" `last_sigmas_type='zero'` is not supported for `lower_order_final=False`. Changing scheduler {self.config} to have `lower_order_final` set to True." ) self.register_to_config(lower_order_final=True)