Update app.py
Browse files
app.py
CHANGED
@@ -11,11 +11,11 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
11 |
|
12 |
if torch.cuda.is_available():
|
13 |
torch.cuda.max_memory_allocated(device=device)
|
14 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/
|
15 |
pipe.enable_xformers_memory_efficient_attention()
|
16 |
pipe = pipe.to(device)
|
17 |
else:
|
18 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/
|
19 |
pipe = pipe.to(device)
|
20 |
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
11 |
|
12 |
if torch.cuda.is_available():
|
13 |
torch.cuda.max_memory_allocated(device=device)
|
14 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
15 |
pipe.enable_xformers_memory_efficient_attention()
|
16 |
pipe = pipe.to(device)
|
17 |
else:
|
18 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", use_safetensors=True)
|
19 |
pipe = pipe.to(device)
|
20 |
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|