Manjushri commited on
Commit
d20dcba
1 Parent(s): 4f26878

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -317,11 +317,11 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, re
317
  image = pipe(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=high_noise_frac).images[0]
318
  torch.cuda.empty_cache()
319
  if upscale == "Yes":
320
- refiner = DiffusionPipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16, use_safetensors=True)
321
- refiner.enable_xformers_memory_efficient_attention()
322
- refiner = refiner.to(device)
323
  torch.cuda.empty_cache()
324
- upscaled = refiner(prompt=Prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=15, guidance_scale=0).images[0]
325
  torch.cuda.empty_cache()
326
  return upscaled
327
  else:
 
317
  image = pipe(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=high_noise_frac).images[0]
318
  torch.cuda.empty_cache()
319
  if upscale == "Yes":
320
+ pipe = DiffusionPipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16, use_safetensors=True)
321
+ pipe.enable_xformers_memory_efficient_attention()
322
+ pipe = pipe.to(device)
323
  torch.cuda.empty_cache()
324
+ upscaled = pipe(prompt=Prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=15, guidance_scale=0).images[0]
325
  torch.cuda.empty_cache()
326
  return upscaled
327
  else: