Spaces:
Paused
Paused
Dagfinn1962
commited on
Commit
•
04a0a82
1
Parent(s):
95257fb
Update app3.py
Browse files
app3.py
CHANGED
@@ -13,15 +13,15 @@ if torch.cuda.is_available():
|
|
13 |
torch.cuda.max_memory_allocated(device=device)
|
14 |
torch.cuda.empty_cache()
|
15 |
|
16 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=
|
17 |
pipe.enable_xformers_memory_efficient_attention()
|
18 |
pipe = pipe.to(device)
|
19 |
torch.cuda.empty_cache()
|
20 |
|
21 |
else:
|
22 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", use_safetensors=
|
23 |
pipe = pipe.to(device)
|
24 |
-
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=
|
25 |
refiner = refiner.to(device)
|
26 |
|
27 |
def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaling):
|
|
|
13 |
torch.cuda.max_memory_allocated(device=device)
|
14 |
torch.cuda.empty_cache()
|
15 |
|
16 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=False)
|
17 |
pipe.enable_xformers_memory_efficient_attention()
|
18 |
pipe = pipe.to(device)
|
19 |
torch.cuda.empty_cache()
|
20 |
|
21 |
else:
|
22 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", use_safetensors=False)
|
23 |
pipe = pipe.to(device)
|
24 |
+
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=False)
|
25 |
refiner = refiner.to(device)
|
26 |
|
27 |
def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaling):
|