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
OpenDAS
diffusers
Commits
8331da46
Unverified
Commit
8331da46
authored
Dec 19, 2022
by
Anton Lozhkov
Committed by
GitHub
Dec 19, 2022
Browse files
Bump to 0.12.0.dev0 (#1771)
parent
f1a32203
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
23 additions
and
23 deletions
+23
-23
examples/community/imagic_stable_diffusion.py
examples/community/imagic_stable_diffusion.py
+1
-1
examples/community/lpw_stable_diffusion.py
examples/community/lpw_stable_diffusion.py
+1
-1
examples/community/lpw_stable_diffusion_onnx.py
examples/community/lpw_stable_diffusion_onnx.py
+1
-1
setup.py
setup.py
+1
-1
src/diffusers/__init__.py
src/diffusers/__init__.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/ddim/pipeline_ddim.py
src/diffusers/pipelines/ddim/pipeline_ddim.py
+1
-1
src/diffusers/pipelines/ddpm/pipeline_ddpm.py
src/diffusers/pipelines/ddpm/pipeline_ddpm.py
+2
-2
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
...nt_diffusion/pipeline_latent_diffusion_superresolution.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_onnx_stable_diffusion_img2img.py
...table_diffusion/pipeline_onnx_stable_diffusion_img2img.py
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint_legacy.py
...iffusion/pipeline_onnx_stable_diffusion_inpaint_legacy.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_legacy.py
...ble_diffusion/pipeline_stable_diffusion_inpaint_legacy.py
+1
-1
src/diffusers/schedulers/scheduling_ddim.py
src/diffusers/schedulers/scheduling_ddim.py
+1
-1
src/diffusers/schedulers/scheduling_ddim_flax.py
src/diffusers/schedulers/scheduling_ddim_flax.py
+1
-1
src/diffusers/schedulers/scheduling_ddpm.py
src/diffusers/schedulers/scheduling_ddpm.py
+2
-2
src/diffusers/schedulers/scheduling_ddpm_flax.py
src/diffusers/schedulers/scheduling_ddpm_flax.py
+2
-2
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py
...ffusers/schedulers/scheduling_dpmsolver_multistep_flax.py
+1
-1
No files found.
examples/community/imagic_stable_diffusion.py
View file @
8331da46
...
@@ -185,7 +185,7 @@ class ImagicStableDiffusionPipeline(DiffusionPipeline):
...
@@ -185,7 +185,7 @@ class ImagicStableDiffusionPipeline(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
accelerator
=
Accelerator
(
accelerator
=
Accelerator
(
...
...
examples/community/lpw_stable_diffusion.py
View file @
8331da46
...
@@ -759,7 +759,7 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
...
@@ -759,7 +759,7 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
# 0. Default height and width to unet
# 0. Default height and width to unet
...
...
examples/community/lpw_stable_diffusion_onnx.py
View file @
8331da46
...
@@ -746,7 +746,7 @@ class OnnxStableDiffusionLongPromptWeightingPipeline(OnnxStableDiffusionPipeline
...
@@ -746,7 +746,7 @@ class OnnxStableDiffusionLongPromptWeightingPipeline(OnnxStableDiffusionPipeline
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
# 0. Default height and width to unet
# 0. Default height and width to unet
...
...
setup.py
View file @
8331da46
...
@@ -218,7 +218,7 @@ install_requires = [
...
@@ -218,7 +218,7 @@ install_requires = [
setup
(
setup
(
name
=
"diffusers"
,
name
=
"diffusers"
,
version
=
"0.1
1.
0"
,
# expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
version
=
"0.1
2.0.dev
0"
,
# expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
description
=
"Diffusers"
,
description
=
"Diffusers"
,
long_description
=
open
(
"README.md"
,
"r"
,
encoding
=
"utf-8"
).
read
(),
long_description
=
open
(
"README.md"
,
"r"
,
encoding
=
"utf-8"
).
read
(),
long_description_content_type
=
"text/markdown"
,
long_description_content_type
=
"text/markdown"
,
...
...
src/diffusers/__init__.py
View file @
8331da46
__version__
=
"0.1
1.
0"
__version__
=
"0.1
2.0.dev
0"
from
.configuration_utils
import
ConfigMixin
from
.configuration_utils
import
ConfigMixin
from
.onnx_utils
import
OnnxRuntimeModel
from
.onnx_utils
import
OnnxRuntimeModel
...
...
src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py
View file @
8331da46
...
@@ -523,7 +523,7 @@ class AltDiffusionImg2ImgPipeline(DiffusionPipeline):
...
@@ -523,7 +523,7 @@ class AltDiffusionImg2ImgPipeline(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
# 1. Check inputs
# 1. Check inputs
...
...
src/diffusers/pipelines/ddim/pipeline_ddim.py
View file @
8331da46
...
@@ -87,7 +87,7 @@ class DDIMPipeline(DiffusionPipeline):
...
@@ -87,7 +87,7 @@ class DDIMPipeline(DiffusionPipeline):
)
)
deprecate
(
deprecate
(
"generator.device == 'cpu'"
,
"generator.device == 'cpu'"
,
"0.1
2
.0"
,
"0.1
3
.0"
,
message
,
message
,
)
)
generator
=
None
generator
=
None
...
...
src/diffusers/pipelines/ddpm/pipeline_ddpm.py
View file @
8331da46
...
@@ -73,7 +73,7 @@ class DDPMPipeline(DiffusionPipeline):
...
@@ -73,7 +73,7 @@ class DDPMPipeline(DiffusionPipeline):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
new_config
=
dict
(
self
.
scheduler
.
config
)
new_config
=
dict
(
self
.
scheduler
.
config
)
...
@@ -88,7 +88,7 @@ class DDPMPipeline(DiffusionPipeline):
...
@@ -88,7 +88,7 @@ class DDPMPipeline(DiffusionPipeline):
)
)
deprecate
(
deprecate
(
"generator.device == 'cpu'"
,
"generator.device == 'cpu'"
,
"0.1
2
.0"
,
"0.1
3
.0"
,
message
,
message
,
)
)
generator
=
None
generator
=
None
...
...
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
View file @
8331da46
...
@@ -103,7 +103,7 @@ class LDMSuperResolutionPipeline(DiffusionPipeline):
...
@@ -103,7 +103,7 @@ class LDMSuperResolutionPipeline(DiffusionPipeline):
generated images.
generated images.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
if
isinstance
(
image
,
PIL
.
Image
.
Image
):
if
isinstance
(
image
,
PIL
.
Image
.
Image
):
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py
View file @
8331da46
...
@@ -565,7 +565,7 @@ class CycleDiffusionPipeline(DiffusionPipeline):
...
@@ -565,7 +565,7 @@ class CycleDiffusionPipeline(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
# 1. Check inputs
# 1. Check inputs
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py
View file @
8331da46
...
@@ -311,7 +311,7 @@ class OnnxStableDiffusionImg2ImgPipeline(DiffusionPipeline):
...
@@ -311,7 +311,7 @@ class OnnxStableDiffusionImg2ImgPipeline(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
if
isinstance
(
prompt
,
str
):
if
isinstance
(
prompt
,
str
):
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint_legacy.py
View file @
8331da46
...
@@ -303,7 +303,7 @@ class OnnxStableDiffusionInpaintPipelineLegacy(DiffusionPipeline):
...
@@ -303,7 +303,7 @@ class OnnxStableDiffusionInpaintPipelineLegacy(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
if
isinstance
(
prompt
,
str
):
if
isinstance
(
prompt
,
str
):
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
View file @
8331da46
...
@@ -528,7 +528,7 @@ class StableDiffusionImg2ImgPipeline(DiffusionPipeline):
...
@@ -528,7 +528,7 @@ class StableDiffusionImg2ImgPipeline(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
# 1. Check inputs
# 1. Check inputs
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint_legacy.py
View file @
8331da46
...
@@ -502,7 +502,7 @@ class StableDiffusionInpaintPipelineLegacy(DiffusionPipeline):
...
@@ -502,7 +502,7 @@ class StableDiffusionInpaintPipelineLegacy(DiffusionPipeline):
(nsfw) content, according to the `safety_checker`.
(nsfw) content, according to the `safety_checker`.
"""
"""
message
=
"Please use `image` instead of `init_image`."
message
=
"Please use `image` instead of `init_image`."
init_image
=
deprecate
(
"init_image"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
init_image
=
deprecate
(
"init_image"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
image
=
init_image
or
image
image
=
init_image
or
image
# 1. Check inputs
# 1. Check inputs
...
...
src/diffusers/schedulers/scheduling_ddim.py
View file @
8331da46
...
@@ -134,7 +134,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -134,7 +134,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" DDIMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" DDIMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
...
...
src/diffusers/schedulers/scheduling_ddim_flax.py
View file @
8331da46
...
@@ -138,7 +138,7 @@ class FlaxDDIMScheduler(FlaxSchedulerMixin, ConfigMixin):
...
@@ -138,7 +138,7 @@ class FlaxDDIMScheduler(FlaxSchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" FlaxDDIMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" FlaxDDIMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
...
...
src/diffusers/schedulers/scheduling_ddpm.py
View file @
8331da46
...
@@ -126,7 +126,7 @@ class DDPMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -126,7 +126,7 @@ class DDPMScheduler(SchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
...
@@ -256,7 +256,7 @@ class DDPMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -256,7 +256,7 @@ class DDPMScheduler(SchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" DDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
new_config
=
dict
(
self
.
config
)
new_config
=
dict
(
self
.
config
)
new_config
[
"prediction_type"
]
=
"epsilon"
if
predict_epsilon
else
"sample"
new_config
[
"prediction_type"
]
=
"epsilon"
if
predict_epsilon
else
"sample"
...
...
src/diffusers/schedulers/scheduling_ddpm_flax.py
View file @
8331da46
...
@@ -132,7 +132,7 @@ class FlaxDDPMScheduler(FlaxSchedulerMixin, ConfigMixin):
...
@@ -132,7 +132,7 @@ class FlaxDDPMScheduler(FlaxSchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" FlaxDDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" FlaxDDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
...
@@ -239,7 +239,7 @@ class FlaxDDPMScheduler(FlaxSchedulerMixin, ConfigMixin):
...
@@ -239,7 +239,7 @@ class FlaxDDPMScheduler(FlaxSchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" FlaxDDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" FlaxDDPMScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
new_config
=
dict
(
self
.
config
)
new_config
=
dict
(
self
.
config
)
new_config
[
"prediction_type"
]
=
"epsilon"
if
predict_epsilon
else
"sample"
new_config
[
"prediction_type"
]
=
"epsilon"
if
predict_epsilon
else
"sample"
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
View file @
8331da46
...
@@ -143,7 +143,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -143,7 +143,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" DPMSolverMultistepScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" DPMSolverMultistepScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py
View file @
8331da46
...
@@ -177,7 +177,7 @@ class FlaxDPMSolverMultistepScheduler(FlaxSchedulerMixin, ConfigMixin):
...
@@ -177,7 +177,7 @@ class FlaxDPMSolverMultistepScheduler(FlaxSchedulerMixin, ConfigMixin):
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
"Please make sure to instantiate your scheduler with `prediction_type` instead. E.g. `scheduler ="
" FlaxDPMSolverMultistepScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
" FlaxDPMSolverMultistepScheduler.from_pretrained(<model_id>, prediction_type='epsilon')`."
)
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
2
.0"
,
message
,
take_from
=
kwargs
)
predict_epsilon
=
deprecate
(
"predict_epsilon"
,
"0.1
3
.0"
,
message
,
take_from
=
kwargs
)
if
predict_epsilon
is
not
None
:
if
predict_epsilon
is
not
None
:
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
self
.
register_to_config
(
prediction_type
=
"epsilon"
if
predict_epsilon
else
"sample"
)
...
...
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