mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
Open dataset_config json file before load
This commit is contained in:
@@ -486,7 +486,8 @@ def load_user_config(file: str) -> dict:
|
|||||||
|
|
||||||
if file.name.lower().endswith('.json'):
|
if file.name.lower().endswith('.json'):
|
||||||
try:
|
try:
|
||||||
config = json.load(file)
|
with open(file, 'r') as f:
|
||||||
|
config = json.load(f)
|
||||||
except Exception:
|
except Exception:
|
||||||
print(f"Error on parsing JSON config file. Please check the format. / JSON 形式の設定ファイルの読み込みに失敗しました。文法が正しいか確認してください。: {file}")
|
print(f"Error on parsing JSON config file. Please check the format. / JSON 形式の設定ファイルの読み込みに失敗しました。文法が正しいか確認してください。: {file}")
|
||||||
raise
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user