Fix: use s_scale=0 when IP-Adapter loaded but no face requested

When IP-Adapter FaceID is initialized, it modifies the pipeline's UNet
cross-attention layers. Calling raw pipeline() without face embeddings
leaves these layers in a broken state, causing corrupted output.

Solution: When IP-Adapter is loaded but no face_image provided, call
ip_model.generate() with s_scale=0.0 and zero embeddings to properly
disable face conditioning while satisfying the modified layers.
This commit is contained in:
2026-01-01 22:01:18 -06:00
parent 28e00e88e6
commit f5e37bc5b2
2 changed files with 46 additions and 23 deletions

View File

@@ -28,6 +28,7 @@ insightface==0.7.3
# IP-Adapter from GitHub
git+https://github.com/tencent-ailab/IP-Adapter.git
einops # Required by IP-Adapter
# Utilities
pydantic==2.6.0