Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ import modin.pandas as pd
|
|
5 |
from PIL import Image
|
6 |
from diffusers import DiffusionPipeline
|
7 |
|
|
|
|
|
|
|
8 |
if torch.cuda.is_available():
|
9 |
PYTORCH_CUDA_ALLOC_CONF={'max_split_size_mb': 6000}
|
10 |
torch.cuda.max_memory_allocated(device=device)
|
|
|
5 |
from PIL import Image
|
6 |
from diffusers import DiffusionPipeline
|
7 |
|
8 |
+
|
9 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
10 |
+
|
11 |
if torch.cuda.is_available():
|
12 |
PYTORCH_CUDA_ALLOC_CONF={'max_split_size_mb': 6000}
|
13 |
torch.cuda.max_memory_allocated(device=device)
|