ford442 commited on
Commit
3f0ff20
·
1 Parent(s): 20b52c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -120,7 +120,7 @@ def load_and_prepare_model(model_id):
120
  use_safetensors=True,
121
  vae=vae,
122
  )
123
- sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="squaredcos_cap_v2",use_karras_sigmas=True, algorithm_type="dpmsolver++")
124
  #sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
125
  #sched = DDIMScheduler.from_config(pipe.scheduler.config)
126
  pipe.scheduler=sched
@@ -191,6 +191,7 @@ def generate_60(
191
  if use_resolution_binning:
192
  options["use_resolution_binning"] = True
193
  images = []
 
194
  with torch.no_grad():
195
  for i in range(0, num_images, BATCH_SIZE):
196
  batch_options = options.copy()
 
120
  use_safetensors=True,
121
  vae=vae,
122
  )
123
+ sched = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear",use_karras_sigmas=True, algorithm_type="dpmsolver++")
124
  #sched = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, beta_schedule="linear", algorithm_type="dpmsolver++")
125
  #sched = DDIMScheduler.from_config(pipe.scheduler.config)
126
  pipe.scheduler=sched
 
191
  if use_resolution_binning:
192
  options["use_resolution_binning"] = True
193
  images = []
194
+ pipe.scheduler.set_timesteps(num_inference_steps,device)
195
  with torch.no_grad():
196
  for i in range(0, num_images, BATCH_SIZE):
197
  batch_options = options.copy()