Closed yichunk closed 1 month ago
Refactor layers for CLIP text encoder of SD model. Tested to successfully generate a proper image as before refactoring.
There are several updates in this PR.
GATED_SHARED
FeedForwardType
qkv_transpose_before_split
AttentionConfig
GELU_QUICK
ActivationType
attn_fused_qkv_proj
TensorNames
embedding_position
BUG=b/311216181
@haozha111 could you re-approve the PR? I added another commit for formatting.
Refactor layers for CLIP text encoder of SD model. Tested to successfully generate a proper image as before refactoring.
There are several updates in this PR.
AddGATED_SHARED
type inFeedForwardType
, which is used in CLIP.qkv_transpose_before_split
filed inAttentionConfig
, which is used in CLIP.GELU_QUICK
type inActivationType
, which is used in CLIP.attn_fused_qkv_proj
inTensorNames
, which bundle qkv projection tensors in one tensor, used in CLIP.embedding_position
inTensorNames
, which is a learned position embedding, used in CLIP.BUG=b/311216181