From 11cd8453d219915f9080dcc56f466a535d7e2ee4 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Wed, 22 Jan 2025 19:53:27 -0600 Subject: [PATCH] Fixed bugs with previous commit --- animatediff/sample_settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/animatediff/sample_settings.py b/animatediff/sample_settings.py index 638e7c5..477452b 100644 --- a/animatediff/sample_settings.py +++ b/animatediff/sample_settings.py @@ -664,9 +664,11 @@ class CustomCFGKeyframeGroup: def initialize_timesteps(self, model: BaseModel): for keyframe in self.keyframes: - to_assign = model.model_sampling.percent_to_sigma(keyframe.start_percent) + to_assign = torch.tensor(model.model_sampling.percent_to_sigma(keyframe.start_percent), device=model.model_sampling.sigma_max.device) if keyframe.start_percent == 0.0 and to_assign > model.model_sampling.sigma_max: keyframe.start_t = model.model_sampling.sigma_max + else: + keyframe.start_t = to_assign def prepare_current_keyframe(self, t: Tensor, transformer_options: dict[str, Tensor]): curr_t: float = t[0]