clip-vit-large-patch14-336
This model was trained using the clip-vit-large-patch14-336 vision and HiDream 248 Long CLIP It was tested working in comfy. You will need to set training to ignore the mismatched length as CLIP has no definition for the model.
def load_clip_with_long_context(model_path, max_length=248): print(f"Loading CLIP model with max_length = {max_length}...")
text_config = CLIPTextConfig.from_pretrained(model_path)
text_config.max_position_embeddings = max_length
model = CLIPModel.from_pretrained(
model_path,
ignore_mismatched_sizes=True,
torch_dtype=torch.float32,
text_config=text_config,
)
- Downloads last month
- 8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support