Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -44,6 +44,10 @@ examples = [
|
|
44 |
]
|
45 |
|
46 |
# Environment variables and defaults for configuration
|
|
|
|
|
|
|
|
|
47 |
MODEL_ID = os.getenv("MODEL_USED") #Use SDXL Model as "MODEL_REPO" --------->>> ”VALUE”.
|
48 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
49 |
USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
|
|
|
44 |
]
|
45 |
|
46 |
# Environment variables and defaults for configuration
|
47 |
+
|
48 |
+
if not torch.cuda.is_available():
|
49 |
+
DESCRIPTION += "\n<p>⚠️Running on CPU, This may not work on CPU. Move this process to the CPU. If it runs for an extended time or if you encounter errors, try running it on a GPU by duplicating the space using @spaces.GPU().📍</p>"
|
50 |
+
|
51 |
MODEL_ID = os.getenv("MODEL_USED") #Use SDXL Model as "MODEL_REPO" --------->>> ”VALUE”.
|
52 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
53 |
USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
|