Plat commited on
Commit
1b970c4
β€’
1 Parent(s): 5e4176a
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +6 -6
app.py CHANGED
@@ -95,11 +95,12 @@ def load_pipeline():
95
  IMAGE_MODEL_REPO_ID,
96
  vae=vae,
97
  torch_dtype=torch.float16,
 
98
  add_watermarker=False,
99
  custom_pipeline="lpw_stable_diffusion_xl",
100
  )
101
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
102
- pipe.unet.set_attn_processor(AttnProcessor2_0())
103
  if CPU_OFFLOAD: # local
104
  pipe.enable_sequential_cpu_offload(gpu_id=0, device=device)
105
  else:
 
95
  IMAGE_MODEL_REPO_ID,
96
  vae=vae,
97
  torch_dtype=torch.float16,
98
+ use_safetensors=True,
99
  add_watermarker=False,
100
  custom_pipeline="lpw_stable_diffusion_xl",
101
  )
102
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
103
+ pipe.enable_xformers_memory_efficient_attention()
104
  if CPU_OFFLOAD: # local
105
  pipe.enable_sequential_cpu_offload(gpu_id=0, device=device)
106
  else:
requirements.txt CHANGED
@@ -1,7 +1,7 @@
1
- accelerate
2
 
3
- diffusers
4
- torch
5
- transformers
6
- xformers
7
- spaces
 
1
+ torch==2.4.0
2
 
3
+ accelerate==0.34.2
4
+ diffusers==0.30.1
5
+ transformers==4.45.1
6
+ spaces==0.30.2
7
+ xformers