fix: check the PhotoMaker id_embeds tensor ONLY in PhotoMaker V2 mode (#987)

This commit is contained in:
akleine 2025-11-22 05:47:40 +01:00 committed by GitHub
parent b542894fb9
commit e9bc3b6c06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2800,7 +2800,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;