Update handler.py
Browse files- handler.py +4 -0
handler.py
CHANGED
@@ -12,6 +12,10 @@ from keras_cv.models.generative.stable_diffusion.diffusion_model import Diffusio
|
|
12 |
|
13 |
class EndpointHandler():
|
14 |
def __init__(self, path=""):
|
|
|
|
|
|
|
|
|
15 |
self.seed = None
|
16 |
|
17 |
img_height = 512
|
|
|
12 |
|
13 |
class EndpointHandler():
|
14 |
def __init__(self, path=""):
|
15 |
+
gpus = tf.config.list_physical_devices(device_type = 'GPU')
|
16 |
+
for gpu in gpus:
|
17 |
+
tf.config.experimental.set_memory_growth(gpu, True)
|
18 |
+
|
19 |
self.seed = None
|
20 |
|
21 |
img_height = 512
|