Update forge_ipadapter.py

This commit is contained in:
lllyasviel
2024-02-01 21:38:48 -08:00
parent 4f6b8ad079
commit 597fe3e049

View File

@@ -25,7 +25,6 @@ class PreprocessorClipVisionForIPAdapter(PreprocessorClipVision):
weight_type="original", weight_type="original",
noise=0.0, noise=0.0,
embeds=None, embeds=None,
attn_mask=None,
unfold_batch=False, unfold_batch=False,
) )
return cond return cond
@@ -49,7 +48,6 @@ class PreprocessorClipVisionWithInsightFaceForIPAdapter(PreprocessorClipVisionFo
weight_type="original", weight_type="original",
noise=0.0, noise=0.0,
embeds=None, embeds=None,
attn_mask=None,
unfold_batch=False, unfold_batch=False,
) )
return cond return cond
@@ -81,7 +79,6 @@ class PreprocessorInsightFaceForInstantID(Preprocessor):
weight_type="original", weight_type="original",
noise=0.0, noise=0.0,
embeds=None, embeds=None,
attn_mask=None,
unfold_batch=False, unfold_batch=False,
instant_id=True instant_id=True
) )
@@ -155,6 +152,7 @@ class IPAdapterPatcher(ControlModelPatcher):
end_at=self.end_percent, end_at=self.end_percent,
faceid_v2=self.faceid_v2, faceid_v2=self.faceid_v2,
weight_v2=self.weight_v2, weight_v2=self.weight_v2,
attn_mask=mask.squeeze(1) if mask is not None else None,
**cond, **cond,
)[0] )[0]