xianbao commited on
Commit
8a38aa7
·
verified ·
1 Parent(s): fb8208c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -180,7 +180,9 @@ if IS_SPACE:
180
  downloader = CheckpointDownloader()
181
  downloader.download_all_checkpoints()
182
 
183
- pipeline = load_pipeline(use_distilled=False, device="cuda")
 
 
184
  class HunyuanImageApp:
185
 
186
  @space_context(duration=290)
 
180
  downloader = CheckpointDownloader()
181
  downloader.download_all_checkpoints()
182
 
183
+ device = "cuda" if torch.cuda.is_available() else "cpu"
184
+ pipeline = load_pipeline(use_distilled=False, device=device)
185
+
186
  class HunyuanImageApp:
187
 
188
  @space_context(duration=290)