File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
monai/networks/schedulers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -196,9 +196,10 @@ def set_timesteps(
196196 device: target device to put the data.
197197 input_img_size_numel: int, H*W*D of the image, used with self.use_timestep_transform is True.
198198 """
199- if num_inference_steps > self .num_train_timesteps :
199+ if num_inference_steps > self .num_train_timesteps or num_inference_steps < 1 :
200200 raise ValueError (
201- f"`num_inference_steps`: { num_inference_steps } cannot be larger than `self.num_train_timesteps`:"
201+ f"`num_inference_steps`: { num_inference_steps } should be at least 1, "
202+ "and cannot be larger than `self.num_train_timesteps`:"
202203 f" { self .num_train_timesteps } as the unet model trained with this scheduler can only handle"
203204 f" maximal { self .num_train_timesteps } timesteps."
204205 )
You can’t perform that action at this time.
0 commit comments