HuggingFace Guess
A simple tool to guess an HuggingFace repo URL from a state dict.
This repo does almost the same thing as from diffusers.loaders.single_file_utils import fetch_diffusers_config but a bit stronger and more robust.
The main model detection logics are extracted from Diffusers and stolen from ComfyUI.
import safetensors.torch as sf
import huggingface_guess
state_dict = sf.load_file('./realisticVisionV51_v51VAE.safetensors')
repo_name = huggingface_guess.guess_repo_name(state_dict)
print(repo_name)
The above codes will print runwayml/stable-diffusion-v1-5.
Then you can download (or prefetch configs) from HuggingFace to instantiate models and load weights.
Metadata
Release files for huggingface-guess 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| huggingface_guess-0.1.0.tar.gz | 30.7 kB | Without provenance | Details for huggingface_guess-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| huggingface_guess-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for huggingface_guess-0.1.0-py3-none-any.whl |
Total release size: 62.0 kB
Release files / huggingface_guess-0.1.0.tar.gz
| Download URL | huggingface_guess-0.1.0.tar.gz |
|---|---|
| Size | 30.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
285c8281e72508b522e68eb0cf605220a7335d7f0cfff75c5f537a7ac5d5d3ba
|
|
BLAKE2b-256 checksum How to use checksums |
fec7dd98df73ae1754c06cfb979f92da61717e98b4d05f38448d4d7b8a0b820b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / huggingface_guess-0.1.0-py3-none-any.whl
| Download URL | huggingface_guess-0.1.0-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
226d44ef678c2cccba8a8532d27f8cd257370d3ebb093475e1c69814fbe3873b
|
|
BLAKE2b-256 checksum How to use checksums |
27a5e4bb5fcf5ddcdc810b4a53baa66f4d2f2b521780b1ed9bea177fc1323928
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for huggingface-guess 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.