Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
27d11a00
Unverified
Commit
27d11a00
authored
Aug 16, 2022
by
Patrick von Platen
Committed by
GitHub
Aug 16, 2022
Browse files
[K-LMS Scheduler] fix import (#191)
parent
554e67cb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
src/diffusers/__init__.py
src/diffusers/__init__.py
+2
-2
src/diffusers/schedulers/__init__.py
src/diffusers/schedulers/__init__.py
+2
-0
src/diffusers/schedulers/scheduling_pndm.py
src/diffusers/schedulers/scheduling_pndm.py
+1
-0
src/diffusers/utils/dummy_scipy_objects.py
src/diffusers/utils/dummy_scipy_objects.py
+1
-1
No files found.
src/diffusers/__init__.py
View file @
27d11a00
...
@@ -31,13 +31,13 @@ from .schedulers import (
...
@@ -31,13 +31,13 @@ from .schedulers import (
if
is_scipy_available
():
if
is_scipy_available
():
from
.schedulers
import
LMSDiscreteScheduler
from
.schedulers
import
LMSDiscreteScheduler
else
:
from
.utils.dummy_scipy_objects
import
*
from
.training_utils
import
EMAModel
from
.training_utils
import
EMAModel
if
is_transformers_available
():
if
is_transformers_available
():
from
.pipelines
import
LDMTextToImagePipeline
,
StableDiffusionPipeline
from
.pipelines
import
LDMTextToImagePipeline
,
StableDiffusionPipeline
else
:
else
:
from
.utils.dummy_transformers_objects
import
*
from
.utils.dummy_transformers_objects
import
*
src/diffusers/schedulers/__init__.py
View file @
27d11a00
...
@@ -28,3 +28,5 @@ from .scheduling_utils import SchedulerMixin
...
@@ -28,3 +28,5 @@ from .scheduling_utils import SchedulerMixin
if
is_scipy_available
():
if
is_scipy_available
():
from
.scheduling_lms_discrete
import
LMSDiscreteScheduler
from
.scheduling_lms_discrete
import
LMSDiscreteScheduler
else
:
from
..utils.dummy_scipy_objects
import
*
src/diffusers/schedulers/scheduling_pndm.py
View file @
27d11a00
...
@@ -120,6 +120,7 @@ class PNDMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -120,6 +120,7 @@ class PNDMScheduler(SchedulerMixin, ConfigMixin):
self
.
timesteps
=
self
.
prk_timesteps
+
self
.
plms_timesteps
self
.
timesteps
=
self
.
prk_timesteps
+
self
.
plms_timesteps
self
.
ets
=
[]
self
.
counter
=
0
self
.
counter
=
0
self
.
set_format
(
tensor_format
=
self
.
tensor_format
)
self
.
set_format
(
tensor_format
=
self
.
tensor_format
)
...
...
src/diffusers/utils/dummy_scipy_objects.py
View file @
27d11a00
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
from
..utils
import
DummyObject
,
requires_backends
from
..utils
import
DummyObject
,
requires_backends
class
L
ms
DiscreteScheduler
(
metaclass
=
DummyObject
):
class
L
MS
DiscreteScheduler
(
metaclass
=
DummyObject
):
_backends
=
[
"scipy"
]
_backends
=
[
"scipy"
]
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
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