Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -268,7 +268,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, re
|
|
268 |
if refine == "Yes":
|
269 |
torch.cuda.max_memory_allocated(device=device)
|
270 |
torch.cuda.empty_cache()
|
271 |
-
image = sdxl(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=10, prior_num_inference_steps=20, prior_guidance_scale=3.0,
|
272 |
torch.cuda.empty_cache()
|
273 |
sdxl = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True, torch_dtype=torch.float16, variant="fp16") if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0")
|
274 |
sdxl.enable_xformers_memory_efficient_attention()
|
|
|
268 |
if refine == "Yes":
|
269 |
torch.cuda.max_memory_allocated(device=device)
|
270 |
torch.cuda.empty_cache()
|
271 |
+
image = sdxl(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=10, prior_num_inference_steps=20, prior_guidance_scale=3.0, output_type="latent").images
|
272 |
torch.cuda.empty_cache()
|
273 |
sdxl = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True, torch_dtype=torch.float16, variant="fp16") if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0")
|
274 |
sdxl.enable_xformers_memory_efficient_attention()
|