diff --git a/src/refiners/foundationals/latent_diffusion/solvers/ddim.py b/src/refiners/foundationals/latent_diffusion/solvers/ddim.py index 77423de..5f6c576 100644 --- a/src/refiners/foundationals/latent_diffusion/solvers/ddim.py +++ b/src/refiners/foundationals/latent_diffusion/solvers/ddim.py @@ -65,7 +65,7 @@ class DDIM(Solver): Returns: The denoised version of the input data `x`. """ - assert self.first_inference_step <= step < self.num_inference_steps, "invalid step {step}" + assert self.first_inference_step <= step < self.num_inference_steps, f"invalid step {step}" timestep, previous_timestep = ( self.timesteps[step], diff --git a/src/refiners/foundationals/latent_diffusion/solvers/dpm.py b/src/refiners/foundationals/latent_diffusion/solvers/dpm.py index b2296dc..01caf3d 100644 --- a/src/refiners/foundationals/latent_diffusion/solvers/dpm.py +++ b/src/refiners/foundationals/latent_diffusion/solvers/dpm.py @@ -308,7 +308,7 @@ class DPMSolver(Solver): Returns: The denoised version of the input data `x`. """ - assert self.first_inference_step <= step < self.num_inference_steps, "invalid step {step}" + assert self.first_inference_step <= step < self.num_inference_steps, f"invalid step {step}" scale_factor = self.cumulative_scale_factors[step] noise_ratio = self.noise_std[step] diff --git a/src/refiners/foundationals/latent_diffusion/solvers/euler.py b/src/refiners/foundationals/latent_diffusion/solvers/euler.py index 1f2aa7c..4945a22 100644 --- a/src/refiners/foundationals/latent_diffusion/solvers/euler.py +++ b/src/refiners/foundationals/latent_diffusion/solvers/euler.py @@ -89,7 +89,7 @@ class Euler(Solver): Returns: The denoised version of the input data `x`. """ - assert self.first_inference_step <= step < self.num_inference_steps, "invalid step {step}" + assert self.first_inference_step <= step < self.num_inference_steps, f"invalid step {step}" if self.params.model_prediction_type == ModelPredictionType.SAMPLE: x0 = predicted_noise # the model does not actually predict the noise but x0