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
chenpangpang
diffusers
Commits
66d5a180
Commit
66d5a180
authored
Jul 19, 2022
by
Patrick von Platen
Browse files
small fixes
parent
d5acb411
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py
...s/pipelines/latent_diffusion/pipeline_latent_diffusion.py
+1
-1
tests/test_modeling_utils.py
tests/test_modeling_utils.py
+3
-5
No files found.
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py
View file @
66d5a180
tests/test_modeling_utils.py
View file @
66d5a180
...
...
@@ -22,6 +22,7 @@ import unittest
import
numpy
as
np
import
torch
from
diffusers
import
UNetConditionalModel
# TODO(Patrick) - need to write tests with it
from
diffusers
import
(
AutoencoderKL
,
DDIMPipeline
,
...
...
@@ -40,17 +41,14 @@ from diffusers import (
ScoreSdeVeScheduler
,
ScoreSdeVpPipeline
,
ScoreSdeVpScheduler
,
UNetConditionalModel
,
UNetLDMModel
,
UNetUnconditionalModel
,
VQModel
,
)
from
diffusers.configuration_utils
import
ConfigMixin
from
diffusers.pipeline_utils
import
DiffusionPipeline
from
diffusers.pipelines.latent_diffusion.pipeline_latent_diffusion
import
LDMBertModel
from
diffusers.testing_utils
import
floats_tensor
,
slow
,
torch_device
from
diffusers.training_utils
import
EMAModel
from
transformers
import
BertTokenizer
torch
.
backends
.
cuda
.
matmul
.
allow_tf32
=
False
...
...
@@ -1030,7 +1028,7 @@ class PipelineTesterMixin(unittest.TestCase):
@
slow
def
test_ldm_text2img
(
self
):
ldm
=
LatentDiffusionPipeline
.
from_pretrained
(
"
/home/patrick
/latent-diffusion-text2im-large"
)
ldm
=
LatentDiffusionPipeline
.
from_pretrained
(
"
CompVis
/latent-diffusion-text2im-large"
)
prompt
=
"A painting of a squirrel eating a burger"
generator
=
torch
.
manual_seed
(
0
)
...
...
@@ -1044,7 +1042,7 @@ class PipelineTesterMixin(unittest.TestCase):
@
slow
def
test_ldm_text2img_fast
(
self
):
ldm
=
LatentDiffusionPipeline
.
from_pretrained
(
"
/home/patrick
/latent-diffusion-text2im-large"
)
ldm
=
LatentDiffusionPipeline
.
from_pretrained
(
"
CompVis
/latent-diffusion-text2im-large"
)
prompt
=
"A painting of a squirrel eating a burger"
generator
=
torch
.
manual_seed
(
0
)
...
...
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