(value)
| 629 | config_dict["_diffusers_version"] = __version__ |
| 630 | |
| 631 | def to_json_saveable(value): |
| 632 | if isinstance(value, np.ndarray): |
| 633 | value = value.tolist() |
| 634 | elif isinstance(value, Path): |
| 635 | value = value.as_posix() |
| 636 | elif hasattr(value, "to_dict") and callable(value.to_dict): |
| 637 | value = value.to_dict() |
| 638 | elif isinstance(value, list): |
| 639 | value = [to_json_saveable(v) for v in value] |
| 640 | return value |
| 641 | |
| 642 | if "quantization_config" in config_dict: |
| 643 | config_dict["quantization_config"] = ( |