fix: allow config.json and tokenizer files for DiffRhythm models
This commit is contained in:
@@ -394,8 +394,12 @@ for file_path in latest_snapshot.rglob('*'):
|
|||||||
# If filename filter is specified, only match those files
|
# If filename filter is specified, only match those files
|
||||||
if filename_filter and filename_filter not in file_path.name:
|
if filename_filter and filename_filter not in file_path.name:
|
||||||
continue
|
continue
|
||||||
# Skip metadata files
|
# Skip metadata files except important config files
|
||||||
if file_path.name.endswith(('.json', '.txt', '.md', '.gitattributes')):
|
# Allow: config.json, tokenizer.json, tokenizer_config.json, sentencepiece models
|
||||||
|
important_files = ('config.json', 'tokenizer.json', 'tokenizer_config.json', '.model')
|
||||||
|
if file_path.name.endswith(('.txt', '.md', '.gitattributes')):
|
||||||
|
continue
|
||||||
|
if file_path.name.endswith('.json') and not file_path.name in important_files:
|
||||||
continue
|
continue
|
||||||
print(str(file_path))
|
print(str(file_path))
|
||||||
EOPYFINDFIND
|
EOPYFINDFIND
|
||||||
|
|||||||
Reference in New Issue
Block a user