shgao commited on
Commit
b445649
1 Parent(s): 94fe49e
Files changed (2) hide show
  1. sam2edit.py +2 -2
  2. sam2image.py +2 -2
sam2edit.py CHANGED
@@ -42,8 +42,8 @@ def create_demo():
42
  # remove following line if xformers is not installed
43
  pipe.enable_xformers_memory_efficient_attention()
44
 
45
- # pipe.enable_model_cpu_offload() # disable for now because of unknow bug in accelerate
46
- pipe.to(device)
47
  return pipe
48
  global default_controlnet_path
49
  default_controlnet_path = config_dict['LAION Pretrained(v0-3)']
 
42
  # remove following line if xformers is not installed
43
  pipe.enable_xformers_memory_efficient_attention()
44
 
45
+ pipe.enable_model_cpu_offload() # disable for now because of unknow bug in accelerate
46
+ # pipe.to(device)
47
  return pipe
48
  global default_controlnet_path
49
  default_controlnet_path = config_dict['LAION Pretrained(v0-3)']
sam2image.py CHANGED
@@ -42,8 +42,8 @@ def create_demo():
42
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
43
  # remove following line if xformers is not installed
44
  pipe.enable_xformers_memory_efficient_attention()
45
- # pipe.enable_model_cpu_offload() # disable for now because of unknow bug in accelerate
46
- pipe.to(device)
47
  return pipe
48
 
49
  global default_controlnet_path
 
42
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
43
  # remove following line if xformers is not installed
44
  pipe.enable_xformers_memory_efficient_attention()
45
+ pipe.enable_model_cpu_offload() # disable for now because of unknow bug in accelerate
46
+ # pipe.to(device)
47
  return pipe
48
 
49
  global default_controlnet_path