RohitGandikota commited on
Commit
a92cf2d
β€’
1 Parent(s): 9419ae5

testing cuda inference

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,8 +37,8 @@ class Demo:
37
 
38
  self.training = False
39
  self.generating = False
40
- self.device = 'cpu'
41
- self.weight_dtype = torch.float32
42
  self.pipe = StableDiffusionXLPipeline.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0', torch_dtype=self.weight_dtype).to(self.device)
43
 
44
  with gr.Blocks() as demo:
 
37
 
38
  self.training = False
39
  self.generating = False
40
+ self.device = 'cuda'
41
+ self.weight_dtype = torch.float16
42
  self.pipe = StableDiffusionXLPipeline.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0', torch_dtype=self.weight_dtype).to(self.device)
43
 
44
  with gr.Blocks() as demo: