diff --git a/src/stable-diffusion.cpp b/src/stable-diffusion.cpp index 5cfa300f6..d4a6263c3 100644 --- a/src/stable-diffusion.cpp +++ b/src/stable-diffusion.cpp @@ -5776,7 +5776,7 @@ static std::optional prepare_video_generation_latents(sd auto encode_condition_frame = [&](const sd::Tensor& image, int64_t latent_frame, const char* name) -> bool { - auto encoded = sd_ctx->sd->encode_first_stage(image); + auto encoded = sd_ctx->sd->encode_first_stage(image.unsqueeze(2)); if (encoded.empty()) { LOG_ERROR("failed to encode Hunyuan Video %s conditioning frame", name); return false;