def __init__(self, image_size, in_channels, model_channels, num_res_blocks, attention_resolutions, dropout=0, channel_mult=(1, 2, 4, 8), conv_resample=True, dims=2, use_checkpoint=False, use_fp16=True, num_heads=1, num_head_channels=(- 1), num_heads_upsample=(- 1), use_scale_shift_norm=True, resblock_updown=True, use_new_attention_order=False, enc_attn_dim=None, vocab_size=None, cross=False, dropout_text=0):
    super().__init__()
    self.image_encoder = ImageEncoder(image_size, in_channels, model_channels, num_res_blocks, attention_resolutions, dropout=dropout, channel_mult=channel_mult, conv_resample=conv_resample, dims=dims, use_checkpoint=use_checkpoint, use_fp16=use_fp16, num_heads=num_heads, num_head_channels=num_head_channels, num_heads_upsample=num_heads_upsample, use_scale_shift_norm=use_scale_shift_norm, resblock_updown=resblock_updown, use_new_attention_order=use_new_attention_order, enc_attn_dim=enc_attn_dim, cross=cross)
    self.text_encoder = TransformerEncoder(enc_attn_dim, vocab_size, use_checkpoint, clip=True, dropout=dropout_text)
    self.logit_scale = LogitScale()
def __init__(self, image_size, in_channels, model_channels, num_res_blocks, attention_resolutions, dropout=0, channel_mult=(1, 2, 4, 8), conv_resample=True, dims=2, use_checkpoint=False, use_fp16=True, num_heads=1, num_head_channels=(- 1), num_heads_upsample=(- 1), use_scale_shift_norm=True, resblock_updown=True, use_new_attention_order=False, enc_attn_dim=None, vocab_size=None, cross=False, dropout_text=0):
    super().__init__()
    self.image_encoder = ImageEncoder(image_size, in_channels, model_channels, num_res_blocks, attention_resolutions, dropout=dropout, channel_mult=channel_mult, conv_resample=conv_resample, dims=dims, use_checkpoint=use_checkpoint, use_fp16=use_fp16, num_heads=num_heads, num_head_channels=num_head_channels, num_heads_upsample=num_heads_upsample, use_scale_shift_norm=use_scale_shift_norm, resblock_updown=resblock_updown, use_new_attention_order=use_new_attention_order, enc_attn_dim=enc_attn_dim, cross=cross)
    self.text_encoder = TransformerEncoder(enc_attn_dim, vocab_size, use_checkpoint, clip=True, dropout=dropout_text)
    self.logit_scale = LogitScale()