torch.cuda.empty_cache()
Browse files
app.py
CHANGED
@@ -396,6 +396,7 @@ def restore_on_gpu(
|
|
396 |
x_samples = (einops.rearrange(samples, 'b c h w -> b h w c') * 127.5 + 127.5).cpu().numpy().round().clip(
|
397 |
0, 255).astype(np.uint8)
|
398 |
results = [x_samples[i] for i in range(num_samples)]
|
|
|
399 |
|
400 |
# All the results have the same size
|
401 |
input_height, input_width, input_channel = np.array(input_image).shape
|
|
|
396 |
x_samples = (einops.rearrange(samples, 'b c h w -> b h w c') * 127.5 + 127.5).cpu().numpy().round().clip(
|
397 |
0, 255).astype(np.uint8)
|
398 |
results = [x_samples[i] for i in range(num_samples)]
|
399 |
+
torch.cuda.empty_cache()
|
400 |
|
401 |
# All the results have the same size
|
402 |
input_height, input_width, input_channel = np.array(input_image).shape
|