(self)
| 97 | return image_proj_model |
| 98 | |
| 99 | def init_proj_plus(self): |
| 100 | image_proj_model = Resampler( |
| 101 | dim=self.cross_attention_dim, |
| 102 | depth=4, |
| 103 | dim_head=64, |
| 104 | heads=20 if self.is_sdxl and not self.is_kwai_kolors else 12, |
| 105 | num_queries=self.clip_extra_context_tokens, |
| 106 | embedding_dim=self.clip_embeddings_dim, |
| 107 | output_dim=self.output_cross_attention_dim, |
| 108 | ff_mult=4 |
| 109 | ) |
| 110 | return image_proj_model |
| 111 | |
| 112 | def init_proj_full(self): |
| 113 | image_proj_model = MLPProjModel( |