Spaces:
Runtime error
Runtime error
RohitGandikota
commited on
Commit
β’
628f18c
1
Parent(s):
81a83c8
adding accelerate and testing CPU
Browse files- app.py +2 -2
- requirements.txt +1 -0
app.py
CHANGED
@@ -37,8 +37,8 @@ class Demo:
|
|
37 |
|
38 |
self.training = False
|
39 |
self.generating = False
|
40 |
-
self.device = '
|
41 |
-
self.weight_dtype = torch.
|
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 = '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:
|
requirements.txt
CHANGED
@@ -20,3 +20,4 @@ torchvision==0.15.2
|
|
20 |
tqdm==4.64.1
|
21 |
transformers==4.27.4
|
22 |
wandb==0.12.21
|
|
|
|
20 |
tqdm==4.64.1
|
21 |
transformers==4.27.4
|
22 |
wandb==0.12.21
|
23 |
+
accelerate==0.16.0
|