MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / to_json_file

Method to_json_file

diffusers/src/diffusers/configuration_utils.py:596–605  ·  view source on GitHub ↗

Save the configuration instance's parameters to a JSON file. Args: json_file_path (`str` or `os.PathLike`): Path to the JSON file to save a configuration instance's parameters.

(self, json_file_path: Union[str, os.PathLike])

Source from the content-addressed store, hash-verified

594 return json.dumps(config_dict, indent=2, sort_keys=True) + "\n"
595
596 def to_json_file(self, json_file_path: Union[str, os.PathLike]):
597 """
598 Save the configuration instance's parameters to a JSON file.
599
600 Args:
601 json_file_path (`str` or `os.PathLike`):
602 Path to the JSON file to save a configuration instance's parameters.
603 """
604 with open(json_file_path, "w", encoding="utf-8") as writer:
605 writer.write(self.to_json_string())
606
607
608def register_to_config(init):

Callers 1

save_configMethod · 0.95

Calls 1

to_json_stringMethod · 0.95

Tested by

no test coverage detected