A simple tool to guess an HuggingFace repo URL from a state dict.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file huggingface_guess-0.1.0.tar.gz.
File metadata
- Download URL: huggingface_guess-0.1.0.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
285c8281e72508b522e68eb0cf605220a7335d7f0cfff75c5f537a7ac5d5d3ba
|
|
| MD5 |
232163e67214738ff11c9527b39c359c
|
|
| BLAKE2b-256 |
fec7dd98df73ae1754c06cfb979f92da61717e98b4d05f38448d4d7b8a0b820b
|
File details
Details for the file huggingface_guess-0.1.0-py3-none-any.whl.
File metadata
- Download URL: huggingface_guess-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
226d44ef678c2cccba8a8532d27f8cd257370d3ebb093475e1c69814fbe3873b
|
|
| MD5 |
7531064a4b48036c74ed7c395dcd5ee1
|
|
| BLAKE2b-256 |
27a5e4bb5fcf5ddcdc810b4a53baa66f4d2f2b521780b1ed9bea177fc1323928
|