Update preprocessor_config.json
Browse files- preprocessor_config.json +34 -16
preprocessor_config.json
CHANGED
|
@@ -1,16 +1,34 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
custom_config = {
|
| 2 |
+
"_class_name": "CLIPModel",
|
| 3 |
+
"_diffusers_version": "1.0.0", # You can adjust the version
|
| 4 |
+
"_name_or_path": "custom-clip-model",
|
| 5 |
+
"temperature": 1.0,
|
| 6 |
+
"image_embedding": 2048,
|
| 7 |
+
"text_embedding": 768,
|
| 8 |
+
"image_encoder": {
|
| 9 |
+
"_class_name": "ImageEncoder",
|
| 10 |
+
"model_name": "resnet50",
|
| 11 |
+
"pretrained": True,
|
| 12 |
+
"trainable": True
|
| 13 |
+
},
|
| 14 |
+
"text_encoder": {
|
| 15 |
+
"_class_name": "TextEncoder",
|
| 16 |
+
"model_name": "distilbert-base-multilingual-cased",
|
| 17 |
+
"pretrained": True,
|
| 18 |
+
"trainable": True
|
| 19 |
+
},
|
| 20 |
+
"image_projection": {
|
| 21 |
+
"_class_name": "ProjectionHead",
|
| 22 |
+
"embedding_dim": 2048,
|
| 23 |
+
"projection_dim": 256,
|
| 24 |
+
"dropout": 0.1
|
| 25 |
+
},
|
| 26 |
+
"text_projection": {
|
| 27 |
+
"_class_name": "ProjectionHead",
|
| 28 |
+
"embedding_dim": 768,
|
| 29 |
+
"projection_dim": 256,
|
| 30 |
+
"dropout": 0.1
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
# Adjust the class names and versions accordingly
|