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
renzhc
diffusers_dcu
Commits
0efac0aa
Commit
0efac0aa
authored
Jun 28, 2022
by
Patrick von Platen
Browse files
remove einops fully
parent
d74b804d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
11 deletions
+0
-11
src/diffusers/models/unet_rl.py
src/diffusers/models/unet_rl.py
+0
-11
No files found.
src/diffusers/models/unet_rl.py
View file @
0efac0aa
...
...
@@ -9,14 +9,6 @@ from ..configuration_utils import ConfigMixin
from
..modeling_utils
import
ModelMixin
# try:
# import einops
# from einops.layers.torch import Rearrange
# except:
# print("Einops is not installed")
# pass
class
SinusoidalPosEmb
(
nn
.
Module
):
def
__init__
(
self
,
dim
):
super
().
__init__
()
...
...
@@ -198,7 +190,6 @@ class TemporalUNet(ModelMixin, ConfigMixin): # (nn.Module):
x : [ batch x horizon x transition ]
"""
# x = einops.rearrange(x, "b h t -> b t h")
x
=
x
.
permute
(
0
,
2
,
1
)
t
=
self
.
time_mlp
(
timesteps
)
...
...
@@ -221,7 +212,6 @@ class TemporalUNet(ModelMixin, ConfigMixin): # (nn.Module):
x
=
self
.
final_conv
(
x
)
# x = einops.rearrange(x, "b t h -> b h t")
x
=
x
.
permute
(
0
,
2
,
1
)
return
x
...
...
@@ -279,7 +269,6 @@ class TemporalValue(nn.Module):
x : [ batch x horizon x transition ]
"""
# x = einops.rearrange(x, "b h t -> b t h")
x
=
x
.
permute
(
0
,
2
,
1
)
t
=
self
.
time_mlp
(
time
)
...
...
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