babaTEEpe commited on
Commit
788e480
·
verified ·
1 Parent(s): 72fd211

Update pipeline/image_engine.py

Browse files
Files changed (1) hide show
  1. pipeline/image_engine.py +3 -1
pipeline/image_engine.py CHANGED
@@ -106,11 +106,13 @@ class ImageEngine:
106
 
107
  if _SD_PIPELINE is None:
108
  print("📥 [Local] Loading Stable Diffusion v1.5 into RAM...")
 
109
  _SD_PIPELINE = StableDiffusionPipeline.from_pretrained(
110
  "runwayml/stable-diffusion-v1-5",
111
  torch_dtype=torch.float32
112
  )
113
- _SD_PIPELINE.scheduler = DPMSolverMultistepScheduler.from_config(_SD_PIPELINE.scheduler.config)
 
114
  _SD_PIPELINE.to("cpu")
115
  _SD_PIPELINE.set_progress_bar_config(disable=True)
116
 
 
106
 
107
  if _SD_PIPELINE is None:
108
  print("📥 [Local] Loading Stable Diffusion v1.5 into RAM...")
109
+ from diffusers import EulerDiscreteScheduler
110
  _SD_PIPELINE = StableDiffusionPipeline.from_pretrained(
111
  "runwayml/stable-diffusion-v1-5",
112
  torch_dtype=torch.float32
113
  )
114
+ # Euler is much more stable on CPU than DPM
115
+ _SD_PIPELINE.scheduler = EulerDiscreteScheduler.from_config(_SD_PIPELINE.scheduler.config)
116
  _SD_PIPELINE.to("cpu")
117
  _SD_PIPELINE.set_progress_bar_config(disable=True)
118