Manjushri commited on
Commit
03bab0c
·
verified ·
1 Parent(s): 9541dc7

Update app.py

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