Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
44e56de9
Unverified
Commit
44e56de9
authored
Nov 22, 2022
by
regisss
Committed by
GitHub
Nov 22, 2022
Browse files
Replace logger.warn by logger.warning (#1366)
parent
2d6d4edb
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
23 additions
and
23 deletions
+23
-23
examples/community/img2img_inpainting.py
examples/community/img2img_inpainting.py
+1
-1
examples/community/interpolate_stable_diffusion.py
examples/community/interpolate_stable_diffusion.py
+1
-1
examples/community/lpw_stable_diffusion.py
examples/community/lpw_stable_diffusion.py
+1
-1
examples/community/multilingual_stable_diffusion.py
examples/community/multilingual_stable_diffusion.py
+1
-1
examples/community/sd_text2img_k_diffusion.py
examples/community/sd_text2img_k_diffusion.py
+1
-1
examples/community/speech_to_image_diffusion.py
examples/community/speech_to_image_diffusion.py
+1
-1
examples/community/text_inpainting.py
examples/community/text_inpainting.py
+1
-1
examples/community/wildcard_stable_diffusion.py
examples/community/wildcard_stable_diffusion.py
+1
-1
src/diffusers/modeling_utils.py
src/diffusers/modeling_utils.py
+1
-1
src/diffusers/pipeline_flax_utils.py
src/diffusers/pipeline_flax_utils.py
+2
-2
src/diffusers/pipeline_utils.py
src/diffusers/pipeline_utils.py
+3
-3
src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py
...ffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py
+1
-1
src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py
...pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
...rs/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py
...elines/stable_diffusion/pipeline_flax_stable_diffusion.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
...s/pipelines/stable_diffusion/pipeline_stable_diffusion.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
...nes/stable_diffusion/pipeline_stable_diffusion_img2img.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
...nes/stable_diffusion/pipeline_stable_diffusion_inpaint.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint_legacy.py
...ble_diffusion/pipeline_stable_diffusion_inpaint_legacy.py
+1
-1
src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py
...s/stable_diffusion_safe/pipeline_stable_diffusion_safe.py
+1
-1
No files found.
examples/community/img2img_inpainting.py
View file @
44e56de9
...
...
@@ -110,7 +110,7 @@ class ImageToImageInpaintingPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/interpolate_stable_diffusion.py
View file @
44e56de9
...
...
@@ -101,7 +101,7 @@ class StableDiffusionWalkPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/lpw_stable_diffusion.py
View file @
44e56de9
...
...
@@ -469,7 +469,7 @@ class StableDiffusionLongPromptWeightingPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/multilingual_stable_diffusion.py
View file @
44e56de9
...
...
@@ -113,7 +113,7 @@ class MultilingualStableDiffusion(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/sd_text2img_k_diffusion.py
View file @
44e56de9
...
...
@@ -77,7 +77,7 @@ class StableDiffusionPipeline(DiffusionPipeline):
super
().
__init__
()
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/speech_to_image_diffusion.py
View file @
44e56de9
...
...
@@ -42,7 +42,7 @@ class SpeechToImagePipeline(DiffusionPipeline):
super
().
__init__
()
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/text_inpainting.py
View file @
44e56de9
...
...
@@ -99,7 +99,7 @@ class TextInpainting(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
examples/community/wildcard_stable_diffusion.py
View file @
44e56de9
...
...
@@ -135,7 +135,7 @@ class WildcardStableDiffusionPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/modeling_utils.py
View file @
44e56de9
...
...
@@ -332,7 +332,7 @@ class ModelMixin(torch.nn.Module):
if
low_cpu_mem_usage
and
not
is_accelerate_available
():
low_cpu_mem_usage
=
False
logger
.
warn
(
logger
.
warn
ing
(
"Cannot initialize model with low cpu memory usage because `accelerate` was not found in the"
" environment. Defaulting to `low_cpu_mem_usage=False`. It is strongly recommended to install"
" `accelerate` for faster and less memory-intense model loading. You can do so with:
\n
```
\n
pip"
...
...
src/diffusers/pipeline_flax_utils.py
View file @
44e56de9
...
...
@@ -411,13 +411,13 @@ class FlaxDiffusionPipeline(ConfigMixin):
f
"
{
expected_class_obj
}
"
)
elif
passed_class_obj
[
name
]
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have passed `None` for
{
name
}
to disable its functionality in
{
pipeline_class
}
. Note"
f
" that this might lead to problems when using
{
pipeline_class
}
and is not recommended."
)
sub_model_should_be_defined
=
False
else
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have passed a non-standard module
{
passed_class_obj
[
name
]
}
. We cannot verify whether it"
" has the correct type"
)
...
...
src/diffusers/pipeline_utils.py
View file @
44e56de9
...
...
@@ -405,7 +405,7 @@ class DiffusionPipeline(ConfigMixin):
if
low_cpu_mem_usage
and
not
is_accelerate_available
():
low_cpu_mem_usage
=
False
logger
.
warn
(
logger
.
warn
ing
(
"Cannot initialize model with low cpu memory usage because `accelerate` was not found in the"
" environment. Defaulting to `low_cpu_mem_usage=False`. It is strongly recommended to install"
" `accelerate` for faster and less memory-intense model loading. You can do so with:
\n
```
\n
pip"
...
...
@@ -571,13 +571,13 @@ class DiffusionPipeline(ConfigMixin):
f
"
{
expected_class_obj
}
"
)
elif
passed_class_obj
[
name
]
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have passed `None` for
{
name
}
to disable its functionality in
{
pipeline_class
}
. Note"
f
" that this might lead to problems when using
{
pipeline_class
}
and is not recommended."
)
sub_model_should_be_defined
=
False
else
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have passed a non-standard module
{
passed_class_obj
[
name
]
}
. We cannot verify whether it"
" has the correct type"
)
...
...
src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py
View file @
44e56de9
...
...
@@ -115,7 +115,7 @@ class AltDiffusionPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Alt Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py
View file @
44e56de9
...
...
@@ -128,7 +128,7 @@ class AltDiffusionImg2ImgPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Alt Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
View file @
44e56de9
...
...
@@ -160,7 +160,7 @@ class CycleDiffusionPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py
View file @
44e56de9
...
...
@@ -88,7 +88,7 @@ class FlaxStableDiffusionPipeline(FlaxDiffusionPipeline):
self
.
dtype
=
dtype
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
View file @
44e56de9
...
...
@@ -114,7 +114,7 @@ class StableDiffusionPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
View file @
44e56de9
...
...
@@ -127,7 +127,7 @@ class StableDiffusionImg2ImgPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
View file @
44e56de9
...
...
@@ -192,7 +192,7 @@ class StableDiffusionInpaintPipeline(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint_legacy.py
View file @
44e56de9
...
...
@@ -140,7 +140,7 @@ class StableDiffusionInpaintPipelineLegacy(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py
View file @
44e56de9
...
...
@@ -108,7 +108,7 @@ class StableDiffusionPipelineSafe(DiffusionPipeline):
scheduler
.
_internal_dict
=
FrozenDict
(
new_config
)
if
safety_checker
is
None
:
logger
.
warn
(
logger
.
warn
ing
(
f
"You have disabled the safety checker for
{
self
.
__class__
}
by passing `safety_checker=None`. Ensure"
" that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered"
" results in services or applications open to the public. Both the diffusers team and Hugging Face"
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment