Manjushri commited on
Commit
1663d97
·
verified ·
1 Parent(s): 474a504

Update app.py

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