Spaces:
Runtime error
Runtime error
Commit
•
5ddf66b
1
Parent(s):
3ae15ab
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,10 @@ def generate_images(diffusion_steps, stochasticity, min_signal_rate, max_signal_
|
|
46 |
)
|
47 |
|
48 |
# denormalize
|
49 |
-
data_mean = tf.constant([[[[0.
|
50 |
-
|
51 |
-
generated_images = data_mean + pred_images *
|
52 |
-
generated_images = tf.clip_by_value(
|
53 |
|
54 |
# make grid
|
55 |
generated_images = tf.image.resize(generated_images, (plot_image_size, plot_image_size), method="nearest")
|
|
|
46 |
)
|
47 |
|
48 |
# denormalize
|
49 |
+
data_mean = tf.constant([[[[0.4705 0.3943 0.3033]]]])
|
50 |
+
data_std_dev = tf.constant([[[[0.2892 0.2364 0.2680]]]])
|
51 |
+
generated_images = data_mean + pred_images * data_std_dev
|
52 |
+
generated_images = tf.clip_by_value(generated_images, 0.0, 1.0)
|
53 |
|
54 |
# make grid
|
55 |
generated_images = tf.image.resize(generated_images, (plot_image_size, plot_image_size), method="nearest")
|