Display class name in model error message
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
@@ -201,7 +201,7 @@ class StableDiffusionBrushNetPipeline(
|
|||||||
|
|
||||||
if safety_checker is not None and feature_extractor is None:
|
if safety_checker is not None and feature_extractor is None:
|
||||||
raise ValueError(
|
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."
|
" checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class StableDiffusionInpaintPipeline(
|
|||||||
|
|
||||||
if safety_checker is not None and feature_extractor is None:
|
if safety_checker is not None and feature_extractor is None:
|
||||||
raise ValueError(
|
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."
|
" checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ class StableDiffusionPowerPaintBrushNetPipeline(
|
|||||||
|
|
||||||
if safety_checker is not None and feature_extractor is None:
|
if safety_checker is not None and feature_extractor is None:
|
||||||
raise ValueError(
|
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."
|
" checker. If you do not want to use the safety checker, you can pass `'safety_checker=None'` instead."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user