Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -350,14 +350,14 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, re
|
|
350 |
if Model == 'CascadeXL':
|
351 |
torch.cuda.empty_cache()
|
352 |
from diffusers import StableCascadeCombinedPipeline
|
353 |
-
pipe = StableCascadeCombinedPipeline.from_pretrained("stabilityai/stable-cascade", variant="bf16", torch_dtype=torch.bfloat16)
|
354 |
pipe.enable_xformers_memory_efficient_attention()
|
355 |
pipe = pipe.to(device)
|
356 |
image = pipe(prompt=Prompt, negative_prompt=negative_prompt, num_inference_steps=10, prior_num_inference_steps=20, prior_guidance_scale=3.0, width=width, height=height).images[0]
|
357 |
|
358 |
if upscale == 'Yes':
|
359 |
torch.cuda.empty_cache()
|
360 |
-
upscaler = DiffusionPipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16, use_safetensors=True
|
361 |
upscaler.enable_xformers_memory_efficient_attention()
|
362 |
upscaler = upscaler.to(device)
|
363 |
torch.cuda.empty_cache()
|
|
|
350 |
if Model == 'CascadeXL':
|
351 |
torch.cuda.empty_cache()
|
352 |
from diffusers import StableCascadeCombinedPipeline
|
353 |
+
pipe = StableCascadeCombinedPipeline.from_pretrained("stabilityai/stable-cascade", variant="bf16", torch_dtype=torch.bfloat16, safety_checker=None)
|
354 |
pipe.enable_xformers_memory_efficient_attention()
|
355 |
pipe = pipe.to(device)
|
356 |
image = pipe(prompt=Prompt, negative_prompt=negative_prompt, num_inference_steps=10, prior_num_inference_steps=20, prior_guidance_scale=3.0, width=width, height=height).images[0]
|
357 |
|
358 |
if upscale == 'Yes':
|
359 |
torch.cuda.empty_cache()
|
360 |
+
upscaler = DiffusionPipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16, use_safetensors=True)
|
361 |
upscaler.enable_xformers_memory_efficient_attention()
|
362 |
upscaler = upscaler.to(device)
|
363 |
torch.cuda.empty_cache()
|