Update configuration_florence2.py
Browse filesThe error "only DaViT is supported for now" appears whenloading the fine-tuned model
configuration_florence2.py
CHANGED
@@ -77,7 +77,7 @@ class Florence2VisionConfig(PretrainedConfig):
|
|
77 |
>>> configuration = model.config
|
78 |
```"""
|
79 |
|
80 |
-
model_type = "
|
81 |
keys_to_ignore_at_inference = ["past_key_values"]
|
82 |
|
83 |
def __init__(
|
@@ -327,7 +327,7 @@ class Florence2Config(PretrainedConfig):
|
|
327 |
self.vocab_size = vocab_size
|
328 |
self.projection_dim = projection_dim
|
329 |
if vision_config is not None:
|
330 |
-
vision_config =
|
331 |
self.vision_config = vision_config
|
332 |
self.vocab_size = self.vocab_size
|
333 |
|
|
|
77 |
>>> configuration = model.config
|
78 |
```"""
|
79 |
|
80 |
+
model_type = "davit"
|
81 |
keys_to_ignore_at_inference = ["past_key_values"]
|
82 |
|
83 |
def __init__(
|
|
|
327 |
self.vocab_size = vocab_size
|
328 |
self.projection_dim = projection_dim
|
329 |
if vision_config is not None:
|
330 |
+
vision_config = Florence2VisionConfig(**vision_config)
|
331 |
self.vision_config = vision_config
|
332 |
self.vocab_size = self.vocab_size
|
333 |
|