Manjushri commited on
Commit
01c29bd
·
verified ·
1 Parent(s): 87a75a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
10
  torch.cuda.max_memory_allocated(device=device)
11
  torch.cuda.empty_cache()
12
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-fusionXL-v1").to(device)
13
- pipe.enable_xformers_memory_efficient_attention()
14
  torch.cuda.empty_cache()
15
 
16
  def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
@@ -19,7 +19,7 @@ def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
19
  int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type="latent").images
20
  torch.cuda.empty_cache()
21
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0").to(device)
22
- refiner.enable_xformers_memory_efficient_attention()
23
  torch.cuda.empty_cache()
24
  image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=.99).images[0]
25
  torch.cuda.empty_cache()
 
10
  torch.cuda.max_memory_allocated(device=device)
11
  torch.cuda.empty_cache()
12
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-fusionXL-v1").to(device)
13
+ #pipe.enable_xformers_memory_efficient_attention()
14
  torch.cuda.empty_cache()
15
 
16
  def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
 
19
  int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type="latent").images
20
  torch.cuda.empty_cache()
21
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0").to(device)
22
+ #refiner.enable_xformers_memory_efficient_attention()
23
  torch.cuda.empty_cache()
24
  image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=.99).images[0]
25
  torch.cuda.empty_cache()