1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

add centered back

This commit is contained in:
patil-suraj
2022-07-01 12:50:34 +02:00
parent 5018abff6e
commit 0dbc4779c8

View File

@@ -229,6 +229,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
self,
image_size=1024,
num_channels=3,
centered=False,
attn_resolutions=(16,),
ch_mult=(1, 2, 4, 8, 16, 32, 32, 32),
conditional=True,
@@ -253,6 +254,7 @@ class NCSNpp(ModelMixin, ConfigMixin):
self.register_to_config(
image_size=image_size,
num_channels=num_channels,
centered=centered,
attn_resolutions=attn_resolutions,
ch_mult=ch_mult,
conditional=conditional,
@@ -457,7 +459,8 @@ class NCSNpp(ModelMixin, ConfigMixin):
temb = None
# If input data is in [0, 1]
x = 2 * x - 1.0
if not self.config.centered:
x = 2 * x - 1.0
# Downsampling block
input_pyramid = None