Manjushri commited on
Commit
49660b6
·
verified ·
1 Parent(s): ed1bcae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -9,12 +9,11 @@ from huggingface_hub import hf_hub_download
9
  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", 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
- pipe=pipe
 
 
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()
 
9
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
10
  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()