Feature Extraction
Transformers
Safetensors
diva
custom_code
Helw150 commited on
Commit
bf4916e
1 Parent(s): 522a3d9

Safetensor Rename

Browse files
model-00001-of-00004.safetensors → model.safetensors RENAMED
File without changes
model.safetensors.index.json CHANGED
The diff for this file is too large to render. See raw diff
 
modeling_diva.py CHANGED
@@ -117,7 +117,7 @@ class DiVAModel(PreTrainedModel):
117
  ):
118
  if os.path.isdir(pretrained_model_name_or_path):
119
  via_path = (
120
- pretrained_model_name_or_path + "/model-00001-of-00004.safetensors"
121
  )
122
  config_path = pretrained_model_name_or_path + "/config.json"
123
  else:
@@ -126,7 +126,7 @@ class DiVAModel(PreTrainedModel):
126
 
127
  hf_hub_download(
128
  repo_id=pretrained_model_name_or_path,
129
- filename="model-00001-of-00004.safetensors",
130
  token=kwargs.get("token", None),
131
  local_dir=os.path.dirname(__file__),
132
  )
@@ -136,7 +136,7 @@ class DiVAModel(PreTrainedModel):
136
  token=kwargs.get("token", None),
137
  local_dir=os.path.dirname(__file__),
138
  )
139
- via_path = os.path.dirname(__file__) + "/model-00001-of-00004.safetensors"
140
  config_path = os.path.dirname(__file__) + "/config.json"
141
  with open(config_path, "r") as f:
142
  config_dict = json.loads(f.read())
 
117
  ):
118
  if os.path.isdir(pretrained_model_name_or_path):
119
  via_path = (
120
+ pretrained_model_name_or_path + "/model.safetensors"
121
  )
122
  config_path = pretrained_model_name_or_path + "/config.json"
123
  else:
 
126
 
127
  hf_hub_download(
128
  repo_id=pretrained_model_name_or_path,
129
+ filename="model.safetensors",
130
  token=kwargs.get("token", None),
131
  local_dir=os.path.dirname(__file__),
132
  )
 
136
  token=kwargs.get("token", None),
137
  local_dir=os.path.dirname(__file__),
138
  )
139
+ via_path = os.path.dirname(__file__) + "/model.safetensors"
140
  config_path = os.path.dirname(__file__) + "/config.json"
141
  with open(config_path, "r") as f:
142
  config_dict = json.loads(f.read())