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
5b1af9ab
Commit
5b1af9ab
authored
Jun 07, 2022
by
Patrick von Platen
Browse files
correct naming in glide
parent
0a1d4c58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/diffusers/models/unet.py
src/diffusers/models/unet.py
+2
-2
src/diffusers/models/unet_glide.py
src/diffusers/models/unet_glide.py
+3
-3
No files found.
src/diffusers/models/unet.py
View file @
5b1af9ab
...
...
@@ -29,7 +29,7 @@ from torchvision import transforms, utils
from
PIL
import
Image
from
tqdm
import
tqdm
from
..configuration_utils
import
ConfigMixin
from
..configuration_utils
import
ConfigMixin
Mixin
from
..modeling_utils
import
ModelMixin
...
...
@@ -175,7 +175,7 @@ class AttnBlock(nn.Module):
return
x
+
h_
class
UNetModel
(
ModelMixin
,
ConfigMixin
):
class
UNetModel
(
ModelMixin
,
ConfigMixin
Mixin
):
def
__init__
(
self
,
ch
=
128
,
...
...
src/diffusers/models/unet_glide.py
View file @
5b1af9ab
...
...
@@ -5,8 +5,8 @@ import torch
import
torch.nn
as
nn
import
torch.nn.functional
as
F
from
..configuration_utils
import
Config
from
..modeling_utils
import
PreTrained
Model
from
..configuration_utils
import
Config
Mixin
from
..modeling_utils
import
Model
Mixin
def
convert_module_to_f16
(
l
):
...
...
@@ -388,7 +388,7 @@ class QKVAttention(nn.Module):
return
a
.
reshape
(
bs
,
-
1
,
length
)
class
UNetGLIDEModel
(
PreTrained
Model
,
Config
):
class
UNetGLIDEModel
(
Model
Mixin
,
Config
Mixin
):
"""
The full UNet model with attention and timestep embedding.
...
...
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