Multi Model Get - A library to download files from various sources including Hugging Face and Civitai
Project description
mmget - Multi Model Get
mmget is a Python library that simplifies downloading files from various sources including regular URLs, Hugging Face, and CivitAI. It provides a unified interface for managing model downloads with support for authentication tokens and customizable download paths.
Features
- Download files from regular URLs
- Download models from Hugging Face using access tokens
- Download models from CivitAI using access tokens
- Interactive version selection when multiple versions are available (Jupyter only)
- Customizable download paths for different software (A1111, ComfyUI) based on model types
- Jupyter notebook integration with GUI interface
- Works in console environment
[Screenshot coming soon]
Installation
You can install mmget using pip:
pip install mmget
Usage
from mmget import mmget
mmget(
hf_token = "" # Hugging Face Access Token [Optional]
civitai_token = "" # CivitAI Access Token [Optional]
).dl(
# Download FLUX-1 Dev Model (Access Token Required) to "Download Paths"
"https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/flux1-dev.safetensors",
"downloads"
).dl(
# Download CivitaAI Model to ComfyUI that will be saved to downloads/comfyui/models/loras
"https://civitai.com/models/7525/1-mb-lora-trained-in-5-mins-that-does-the-same-thing-as-25-gb-model-but-better",
"downloads/comfyui",
dest_type="comfyui"
).run()
CivitAI
When downloading models from CivitAI, you may encounter multiple available versions. In Jupyter notebooks, mmget will display an interactive interface allowing you to choose from the available versions. When running from the console, it will display the available versions and pause the download process until you specify a version.
Moreover, if you set the dest_type is either of "a1111" or "comfyui" , it will find check the type of the model and determine the subfolder to be used.
from mmget import mmget
mget(
civitai_token = "" # It is needed if the author require download to have a civitai account
).dl(
"https://civitai.com/models/257749/pony-diffusion-v6-xl",
version="V6 (start with this one)",
dest_type="comfyui"
).run()
Hugging Face
Finding the URL of a file inside hugging face is easy. Open the "Files and versions" tab, and choose the file, right click and copy link address.
TBD: Screenshot
mmget(
hf_token = "" # Hugging Face Access Token [Optional]
).dl(
# Download FLUX-1 Dev Model (Access Token Required) to "Download Paths"
"https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/flux1-dev.safetensors",
"downloads"
).run()
Environment Variables
mmget reads several environment variables:
- MMGET_CIVITAI_TOKEN - CivitAI access token for downloading models that require authentication
- MMGET_HF_TOKEN - Hugging Face access token for downloading models that require authentication
- MMGET_DEST_PATH - The default distribution path for all downloads if not specified
- MMGET_DEST_TYPE - The default distribution type (e.g. "a1111" or "comfyui") for all downloads if not specified
from dotenv import load_dotenv
from mmget import mmget
load_dotenv() # Load environment variable from .env
mmget(
).dl(
# URL
).run()
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 mmget-0.0.1.tar.gz.
File metadata
- Download URL: mmget-0.0.1.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef506cf7669b55f49f10c30c5e4b9628cc726bc649d730274a81574d125d5bb8
|
|
| MD5 |
677e0446e38de6d6b8dd756bf514dcdf
|
|
| BLAKE2b-256 |
2c77a4684bb4c11c291bf5117b520159346dc3604fd71515ee654404543fcd11
|
File details
Details for the file mmget-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mmget-0.0.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a9b99570623b95ed5e70afb883272b0791206939580ca0f89049b0057d97542
|
|
| MD5 |
59e6bdccf8bf7edded5bd5b3cfb70381
|
|
| BLAKE2b-256 |
bd065cd7c09dcf9b7d97eb4f6e6ee57f447ba1ebf0c2b57b9f06b71a83571204
|