Eugeoter commited on
Commit
986882a
·
1 Parent(s): b6eeb36
Files changed (1) hide show
  1. app.py +0 -9
app.py CHANGED
@@ -13,13 +13,6 @@ CONTROLNET_FILENAME = "ControlAny-SDXL/anime_canny/controlnet.safetensors"
13
  CACHE_DIR = None
14
 
15
 
16
- @spaces.GPU
17
- def optimize_pipeline(pipeline):
18
- pipeline.to(dtype=torch.float16)
19
- # pipeline.enable_xformers_memory_efficient_attention()
20
- return pipeline
21
-
22
-
23
  def ui():
24
  device = "cuda" if torch.cuda.is_available() else "cpu"
25
  model_file = hf_hub_download(
@@ -48,9 +41,7 @@ def ui():
48
  device=device,
49
  hf_cache_dir=CACHE_DIR,
50
  use_safetensors=True,
51
- enable_xformers_memory_efficient_attention=torch.cuda.is_available(),
52
  )
53
- pipeline = optimize_pipeline(pipeline)
54
 
55
  preprocessors = ['canny']
56
  schedulers = ['Euler A', 'UniPC', 'Euler', 'DDIM', 'DDPM']
 
13
  CACHE_DIR = None
14
 
15
 
 
 
 
 
 
 
 
16
  def ui():
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
18
  model_file = hf_hub_download(
 
41
  device=device,
42
  hf_cache_dir=CACHE_DIR,
43
  use_safetensors=True,
 
44
  )
 
45
 
46
  preprocessors = ['canny']
47
  schedulers = ['Euler A', 'UniPC', 'Euler', 'DDIM', 'DDPM']