Spaces:
Runtime error
Runtime error
Update utils_app.py
Browse files- utils_app.py +4 -2
utils_app.py
CHANGED
@@ -4,6 +4,10 @@ from tensorflow import keras
|
|
4 |
import tensorflow as tf
|
5 |
import gradio as gr
|
6 |
|
|
|
|
|
|
|
|
|
7 |
keras_model_list = [
|
8 |
"kadirnar/dreambooth_diffusion_model_v5",
|
9 |
"kadirnar/dreambooth_diffusion_model_v3"
|
@@ -28,8 +32,6 @@ def keras_stable_diffusion(
|
|
28 |
width:int,
|
29 |
):
|
30 |
|
31 |
-
keras.mixed_precision.set_global_policy("mixed_float16")
|
32 |
-
|
33 |
sd_dreambooth_model = models.StableDiffusion(
|
34 |
img_width=height,
|
35 |
img_height=width
|
|
|
4 |
import tensorflow as tf
|
5 |
import gradio as gr
|
6 |
|
7 |
+
|
8 |
+
keras.mixed_precision.set_global_policy("mixed_float16")
|
9 |
+
tf.keras.backend.clear_session()
|
10 |
+
|
11 |
keras_model_list = [
|
12 |
"kadirnar/dreambooth_diffusion_model_v5",
|
13 |
"kadirnar/dreambooth_diffusion_model_v3"
|
|
|
32 |
width:int,
|
33 |
):
|
34 |
|
|
|
|
|
35 |
sd_dreambooth_model = models.StableDiffusion(
|
36 |
img_width=height,
|
37 |
img_height=width
|