rahul7star commited on
Commit
97426e5
·
verified ·
1 Parent(s): 8ee0e91

Update app_quant_latent.py

Browse files
Files changed (1) hide show
  1. app_quant_latent.py +9 -9
app_quant_latent.py CHANGED
@@ -273,18 +273,18 @@ sigmas: list = None,
273
  **kwargs,
274
  ):
275
  if timesteps is not None and sigmas is not None:
276
- raise ValueError("Only one of timesteps or sigmas can be passed")
277
  if timesteps is not None:
278
- scheduler.set_timesteps(timesteps=timesteps, device=device, **kwargs)
279
- timesteps = scheduler.timesteps
280
- num_inference_steps = len(timesteps)
281
  elif sigmas is not None:
282
- scheduler.set_timesteps(sigmas=sigmas, device=device, **kwargs)
283
- timesteps = scheduler.timesteps
284
- num_inference_steps = len(timesteps)
285
  else:
286
- scheduler.set_timesteps(num_inference_steps, device=device, **kwargs)
287
- timesteps = scheduler.timesteps
288
  return timesteps, num_inference_steps
289
 
290
  @spaces.GPU
 
273
  **kwargs,
274
  ):
275
  if timesteps is not None and sigmas is not None:
276
+ raise ValueError("Only one of timesteps or sigmas can be passed")
277
  if timesteps is not None:
278
+ scheduler.set_timesteps(timesteps=timesteps, device=device, **kwargs)
279
+ timesteps = scheduler.timesteps
280
+ num_inference_steps = len(timesteps)
281
  elif sigmas is not None:
282
+ scheduler.set_timesteps(sigmas=sigmas, device=device, **kwargs)
283
+ timesteps = scheduler.timesteps
284
+ num_inference_steps = len(timesteps)
285
  else:
286
+ scheduler.set_timesteps(num_inference_steps, device=device, **kwargs)
287
+ timesteps = scheduler.timesteps
288
  return timesteps, num_inference_steps
289
 
290
  @spaces.GPU