Docty commited on
Commit
ae7d162
·
verified ·
1 Parent(s): 040addf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -0
README.md CHANGED
@@ -39,6 +39,13 @@ pipe = StableDiffusionControlNetPipeline.from_pretrained(
39
  base_model_path, controlnet=controlnet, torch_dtype=torch.float16
40
  )
41
 
 
 
 
 
 
 
 
42
  control_image = load_image("./cond1.jpg")
43
  prompt = "a professional studio photograph of an attractive model wearing a teal top with lace detail"
44
 
 
39
  base_model_path, controlnet=controlnet, torch_dtype=torch.float16
40
  )
41
 
42
+ # speed up diffusion process with faster scheduler and memory optimization
43
+ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
44
+ # remove following line if xformers is not installed or when using Torch 2.0.
45
+ #pipe.enable_xformers_memory_efficient_attention()
46
+ # memory optimization.
47
+ pipe.enable_model_cpu_offload()
48
+
49
  control_image = load_image("./cond1.jpg")
50
  prompt = "a professional studio photograph of an attractive model wearing a teal top with lace detail"
51