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
0dbc4779
Commit
0dbc4779
authored
Jul 01, 2022
by
patil-suraj
Browse files
add centered back
parent
5018abff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/diffusers/models/unet_sde_score_estimation.py
src/diffusers/models/unet_sde_score_estimation.py
+4
-1
No files found.
src/diffusers/models/unet_sde_score_estimation.py
View file @
0dbc4779
...
@@ -229,6 +229,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
...
@@ -229,6 +229,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
self
,
self
,
image_size
=
1024
,
image_size
=
1024
,
num_channels
=
3
,
num_channels
=
3
,
centered
=
False
,
attn_resolutions
=
(
16
,),
attn_resolutions
=
(
16
,),
ch_mult
=
(
1
,
2
,
4
,
8
,
16
,
32
,
32
,
32
),
ch_mult
=
(
1
,
2
,
4
,
8
,
16
,
32
,
32
,
32
),
conditional
=
True
,
conditional
=
True
,
...
@@ -253,6 +254,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
...
@@ -253,6 +254,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
self
.
register_to_config
(
self
.
register_to_config
(
image_size
=
image_size
,
image_size
=
image_size
,
num_channels
=
num_channels
,
num_channels
=
num_channels
,
centered
=
centered
,
attn_resolutions
=
attn_resolutions
,
attn_resolutions
=
attn_resolutions
,
ch_mult
=
ch_mult
,
ch_mult
=
ch_mult
,
conditional
=
conditional
,
conditional
=
conditional
,
...
@@ -457,6 +459,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
...
@@ -457,6 +459,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
temb
=
None
temb
=
None
# If input data is in [0, 1]
# If input data is in [0, 1]
if
not
self
.
config
.
centered
:
x
=
2
*
x
-
1.0
x
=
2
*
x
-
1.0
# Downsampling block
# Downsampling block
...
...
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