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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,10 +14,12 @@ pipe = DiffusionPipeline.from_pretrained("circulus/canvers-fusionXL-v1").to(devi
14
  torch.cuda.empty_cache()
15
 
16
  def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
17
-
 
18
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(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()
 
14
  torch.cuda.empty_cache()
15
 
16
  def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
17
+ torch.cuda.empty_cache()
18
+ torch.cuda.max_memory_allocated(device=device)
19
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
20
  int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type="latent").images
21
  torch.cuda.empty_cache()
22
+ torch.cuda.max_memory_allocated(device=device)
23
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0").to(device)
24
  #refiner.enable_xformers_memory_efficient_attention()
25
  torch.cuda.empty_cache()