Skip to content

Commit

Permalink
Load JSON with UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
fofr committed Jul 1, 2024
1 parent 2d51295 commit f221cd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions import_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ def format_json_files_in_directory(directory):
format_json_file(file_path)


with open("supported_models.json", "r") as f:
with open("supported_models.json", "r", encoding="utf-8") as f:
supported_models = json.load(f)

for model in supported_models["models"]:
m = replicate.models.get(model)
with open(f"schemas/{model.replace('/', '_')}.json", "w") as f:
with open(f"schemas/{model.replace('/', '_')}.json", "w", encoding="utf-8") as f:
f.write(m.json())

schemas_directory = "schemas"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-replicate"
description = "Run Replicate models in ComfyUI"
version = "1.0.2"
version = "1.0.3"
license = "LICENSE"

[project.urls]
Expand Down

0 comments on commit f221cd3

Please sign in to comment.