Walid-Ahmed commited on
Commit
6c20e7c
1 Parent(s): 47613f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -12,6 +12,12 @@ if huggingface_token is None:
12
  # Check if CUDA is available
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
 
 
 
 
 
 
15
  model_path = snapshot_download(
16
  repo_id="stabilityai/stable-diffusion-3-medium",
17
  revision="refs/pr/26",
 
12
  # Check if CUDA is available
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
15
+ # Ensure GPU is available
16
+ if device == "cuda":
17
+ print("CUDA is available. Using GPU.")
18
+ else:
19
+ print("CUDA is not available. Using CPU.")
20
+
21
  model_path = snapshot_download(
22
  repo_id="stabilityai/stable-diffusion-3-medium",
23
  revision="refs/pr/26",