Update pipeline.py
Browse files- pipeline.py +5 -5
pipeline.py
CHANGED
@@ -116,11 +116,11 @@ def retrieve_timesteps(
|
|
116 |
"""
|
117 |
if timesteps is not None:
|
118 |
accepts_timesteps = "timesteps" in set(inspect.signature(scheduler.set_timesteps).parameters.keys())
|
119 |
-
if not accepts_timesteps:
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
scheduler.set_timesteps(timesteps=timesteps, device=device, **kwargs)
|
125 |
timesteps = scheduler.timesteps
|
126 |
num_inference_steps = len(timesteps)
|
|
|
116 |
"""
|
117 |
if timesteps is not None:
|
118 |
accepts_timesteps = "timesteps" in set(inspect.signature(scheduler.set_timesteps).parameters.keys())
|
119 |
+
# if not accepts_timesteps:
|
120 |
+
# raise ValueError(
|
121 |
+
# f"The current scheduler class {scheduler.__class__}'s `set_timesteps` does not support custom"
|
122 |
+
# f" timestep schedules. Please check whether you are using the correct scheduler."
|
123 |
+
# )
|
124 |
scheduler.set_timesteps(timesteps=timesteps, device=device, **kwargs)
|
125 |
timesteps = scheduler.timesteps
|
126 |
num_inference_steps = len(timesteps)
|