Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a proof of concept utility for retrieving the value of a named object inside `__metadata__` from a safetensors file, with the intention of eventually moving the code into `safetensors_util.py` as its own separate `cli.command()` block. I wrote this because so far I haven't seen any other utilities for retrieving these values from safetensors files, e.g. checking `ss_network_module` to tell whether a file is LoRA (`networks.lora`) or Lycoris (`lycoris.kohya`) before trying to install it into a potentially incompatible SD client, or just debugging troublesome safetensors files without having to dump/parse the entire metadata block. Applies `_ParseMore()` to all output for readability's sake but this could be optionally disabled.
- Loading branch information