Spaces:
Runtime error
Runtime error
RohitGandikota
commited on
Commit
Β·
e7fd4ee
1
Parent(s):
11af5bd
fixing ui
Browse files
app.py
CHANGED
|
@@ -66,13 +66,14 @@ class Demo:
|
|
| 66 |
self.generating = False
|
| 67 |
self.device = 'cuda'
|
| 68 |
self.weight_dtype = torch.bfloat16
|
| 69 |
-
|
| 70 |
model_id = 'stabilityai/stable-diffusion-xl-base-1.0'
|
| 71 |
pipe = StableDiffusionXLPipeline.from_pretrained(model_id, torch_dtype=self.weight_dtype).to(self.device)
|
| 72 |
pipe = None
|
| 73 |
del pipe
|
| 74 |
torch.cuda.empty_cache()
|
| 75 |
|
|
|
|
| 76 |
self.current_model = 'SDXL Turbo'
|
| 77 |
euler_anc = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
| 78 |
self.pipe = StableDiffusionXLPipeline.from_pretrained(model_id, scheduler=euler_anc, torch_dtype=self.weight_dtype).to(self.device)
|
|
|
|
| 66 |
self.generating = False
|
| 67 |
self.device = 'cuda'
|
| 68 |
self.weight_dtype = torch.bfloat16
|
| 69 |
+
|
| 70 |
model_id = 'stabilityai/stable-diffusion-xl-base-1.0'
|
| 71 |
pipe = StableDiffusionXLPipeline.from_pretrained(model_id, torch_dtype=self.weight_dtype).to(self.device)
|
| 72 |
pipe = None
|
| 73 |
del pipe
|
| 74 |
torch.cuda.empty_cache()
|
| 75 |
|
| 76 |
+
model_id = "stabilityai/sdxl-turbo"
|
| 77 |
self.current_model = 'SDXL Turbo'
|
| 78 |
euler_anc = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
| 79 |
self.pipe = StableDiffusionXLPipeline.from_pretrained(model_id, scheduler=euler_anc, torch_dtype=self.weight_dtype).to(self.device)
|