zbing commited on
Commit
447e712
1 Parent(s): 6bf1792

Update configuration_florence2.py

Browse files

The error "only DaViT is supported for now" appears whenloading the fine-tuned model

Files changed (1) hide show
  1. configuration_florence2.py +2 -2
configuration_florence2.py CHANGED
@@ -77,7 +77,7 @@ class Florence2VisionConfig(PretrainedConfig):
77
  >>> configuration = model.config
78
  ```"""
79
 
80
- model_type = "florence2_vision"
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 = PretrainedConfig(**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