From 15ea27afaf68a1acda542bc3127d46aaa058fd4d Mon Sep 17 00:00:00 2001 From: akleine Date: Mon, 17 Nov 2025 22:23:35 +0100 Subject: [PATCH] fix: check the PhotoMaker id_embeds tensor ONLY in PhotoMaker V2 mode --- stable-diffusion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable-diffusion.cpp b/stable-diffusion.cpp index 72aa33171..8c3dae5b5 100644 --- a/stable-diffusion.cpp +++ b/stable-diffusion.cpp @@ -2673,7 +2673,7 @@ sd_image_t* generate_image_internal(sd_ctx_t* sd_ctx, LOG_WARN("Turn off PhotoMaker"); sd_ctx->sd->stacked_id = false; } else { - if (pm_params.id_images_count != id_embeds->ne[1]) { + if (pmv2 && pm_params.id_images_count != id_embeds->ne[1]) { LOG_WARN("PhotoMaker image count (%d) does NOT match ID embeds (%d). You should run face_detect.py again.", pm_params.id_images_count, id_embeds->ne[1]); LOG_WARN("Turn off PhotoMaker"); sd_ctx->sd->stacked_id = false;