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
8b42c7ce
Commit
8b42c7ce
authored
Jul 19, 2022
by
Patrick von Platen
Browse files
make all tests pass
parent
66d5a180
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py
...s/pipelines/latent_diffusion/pipeline_latent_diffusion.py
+1
-1
src/diffusers/pipelines/pndm/pipeline_pndm.py
src/diffusers/pipelines/pndm/pipeline_pndm.py
+1
-1
tests/test_modeling_utils.py
tests/test_modeling_utils.py
+1
-2
No files found.
src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py
View file @
8b42c7ce
...
@@ -4,7 +4,7 @@ import torch
...
@@ -4,7 +4,7 @@ import torch
import
torch.nn
as
nn
import
torch.nn
as
nn
import
torch.utils.checkpoint
import
torch.utils.checkpoint
from
tqdm.auto
import
tqdm
import
tqdm
from
transformers.activations
import
ACT2FN
from
transformers.activations
import
ACT2FN
from
transformers.configuration_utils
import
PretrainedConfig
from
transformers.configuration_utils
import
PretrainedConfig
from
transformers.modeling_outputs
import
BaseModelOutput
from
transformers.modeling_outputs
import
BaseModelOutput
...
...
src/diffusers/pipelines/pndm/pipeline_pndm.py
View file @
8b42c7ce
...
@@ -37,7 +37,7 @@ class PNDMPipeline(DiffusionPipeline):
...
@@ -37,7 +37,7 @@ class PNDMPipeline(DiffusionPipeline):
# Sample gaussian noise to begin loop
# Sample gaussian noise to begin loop
image
=
torch
.
randn
(
image
=
torch
.
randn
(
(
batch_size
,
self
.
unet
.
in_channels
,
self
.
unet
.
resolution
,
self
.
unet
.
resolution
),
(
batch_size
,
self
.
unet
.
in_channels
,
self
.
unet
.
image_size
,
self
.
unet
.
image_size
),
generator
=
generator
,
generator
=
generator
,
)
)
image
=
image
.
to
(
torch_device
)
image
=
image
.
to
(
torch_device
)
...
...
tests/test_modeling_utils.py
View file @
8b42c7ce
...
@@ -1011,7 +1011,7 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -1011,7 +1011,7 @@ class PipelineTesterMixin(unittest.TestCase):
def
test_pndm_cifar10
(
self
):
def
test_pndm_cifar10
(
self
):
model_id
=
"google/ddpm-cifar10"
model_id
=
"google/ddpm-cifar10"
unet
=
UNetUnconditionalModel
.
from_pretrained
(
model_id
,
ddpm
=
True
)
unet
=
UNetUnconditionalModel
.
from_pretrained
(
model_id
)
scheduler
=
PNDMScheduler
(
tensor_format
=
"pt"
)
scheduler
=
PNDMScheduler
(
tensor_format
=
"pt"
)
pndm
=
PNDMPipeline
(
unet
=
unet
,
scheduler
=
scheduler
)
pndm
=
PNDMPipeline
(
unet
=
unet
,
scheduler
=
scheduler
)
...
@@ -1072,7 +1072,6 @@ class PipelineTesterMixin(unittest.TestCase):
...
@@ -1072,7 +1072,6 @@ class PipelineTesterMixin(unittest.TestCase):
@
slow
@
slow
def
test_score_sde_ve_pipeline
(
self
):
def
test_score_sde_ve_pipeline
(
self
):
model
=
UNetUnconditionalModel
.
from_pretrained
(
"fusing/ffhq_ncsnpp"
,
sde
=
True
)
model
=
UNetUnconditionalModel
.
from_pretrained
(
"fusing/ffhq_ncsnpp"
,
sde
=
True
)
model
=
UNetUnconditionalModel
.
from_pretrained
(
"google/ffhq_ncsnpp"
)
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
0
)
if
torch
.
cuda
.
is_available
():
if
torch
.
cuda
.
is_available
():
...
...
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