Spaces:
Paused
Paused
fix bug
Browse files
libs/film/eval/interpolator.py
CHANGED
|
@@ -150,7 +150,6 @@ class Interpolator:
|
|
| 150 |
self._block_shape = block_shape or None
|
| 151 |
|
| 152 |
def __del__(self):
|
| 153 |
-
del self._model
|
| 154 |
tf.keras.backend.clear_session()
|
| 155 |
|
| 156 |
def interpolate(self, x0: np.ndarray, x1: np.ndarray,
|
|
@@ -175,8 +174,6 @@ class Interpolator:
|
|
| 175 |
result = self._model(inputs, training=False)
|
| 176 |
image = result['image']
|
| 177 |
|
| 178 |
-
del self._model
|
| 179 |
-
|
| 180 |
if self._align is not None:
|
| 181 |
image = tf.image.crop_to_bounding_box(image, **bbox_to_crop)
|
| 182 |
return image.numpy()
|
|
|
|
| 150 |
self._block_shape = block_shape or None
|
| 151 |
|
| 152 |
def __del__(self):
|
|
|
|
| 153 |
tf.keras.backend.clear_session()
|
| 154 |
|
| 155 |
def interpolate(self, x0: np.ndarray, x1: np.ndarray,
|
|
|
|
| 174 |
result = self._model(inputs, training=False)
|
| 175 |
image = result['image']
|
| 176 |
|
|
|
|
|
|
|
| 177 |
if self._align is not None:
|
| 178 |
image = tf.image.crop_to_bounding_box(image, **bbox_to_crop)
|
| 179 |
return image.numpy()
|