YuliyaAether commited on
Commit
d2986b5
·
verified ·
1 Parent(s): 042ee94

Update diffusers_helper/memory.py

Browse files
Files changed (1) hide show
  1. diffusers_helper/memory.py +3 -1
diffusers_helper/memory.py CHANGED
@@ -5,7 +5,9 @@ import torch
5
 
6
 
7
  cpu = torch.device('cpu')
8
- gpu = torch.device(f'cuda:{torch.cuda.current_device()}')
 
 
9
  gpu_complete_modules = []
10
 
11
 
 
5
 
6
 
7
  cpu = torch.device('cpu')
8
+ # gpu = torch.device(f'cuda:{torch.cuda.current_device()}')
9
+ gpu = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
10
+
11
  gpu_complete_modules = []
12
 
13