Spaces:
Running
on
Zero
Running
on
Zero
free ram
Browse files
app.py
CHANGED
|
@@ -449,6 +449,7 @@ def ncut_run(
|
|
| 449 |
)
|
| 450 |
# print(f"Feature extraction time (gpu): {time.time() - start:.2f}s")
|
| 451 |
logging_str += f"Backbone time: {time.time() - start:.2f}s\n"
|
|
|
|
| 452 |
|
| 453 |
progress(0.4, desc="NCut")
|
| 454 |
|
|
@@ -1094,6 +1095,7 @@ def make_dataset_images_section(advanced=False, is_random=False):
|
|
| 1094 |
image_idx = list(range(num_images))
|
| 1095 |
images = [dataset[i]['image'] for i in image_idx]
|
| 1096 |
gr.Info(f"Loaded {len(images)} images from {dataset_name}")
|
|
|
|
| 1097 |
return images
|
| 1098 |
|
| 1099 |
load_images_button.click(load_dataset_images,
|
|
|
|
| 449 |
)
|
| 450 |
# print(f"Feature extraction time (gpu): {time.time() - start:.2f}s")
|
| 451 |
logging_str += f"Backbone time: {time.time() - start:.2f}s\n"
|
| 452 |
+
del model
|
| 453 |
|
| 454 |
progress(0.4, desc="NCut")
|
| 455 |
|
|
|
|
| 1095 |
image_idx = list(range(num_images))
|
| 1096 |
images = [dataset[i]['image'] for i in image_idx]
|
| 1097 |
gr.Info(f"Loaded {len(images)} images from {dataset_name}")
|
| 1098 |
+
del dataset
|
| 1099 |
return images
|
| 1100 |
|
| 1101 |
load_images_button.click(load_dataset_images,
|