Skip to main content

A downloader for CivitAI models

Project description

CivitAI Downloader

A Python package for downloading models from CivitAI via a command-line tool or programmatically. This package supports token-based authentication and allows users to save downloaded models to a specified directory.

Installation

Install the package via pip:

pip install civitai-downloader

Usage

Gradio webui Usage

to run with gradio webui you can just run by this command

civitai-downloader

Command-Line Usage

To download a model from CivitAI, use the civitai-downloader command with the following arguments:

civitai-downloader <url> <output_path> <token>

Programmatic Usage

You can also use the downloader in your own Python scripts.

from civitai_downloader import download_file, get_token, store_token

url = 'https://civitai.com/api/download/models/46846'
output_path = '/path/to/save'
token = 'your_api_token_here'

download_file(url, output_path, token)

Features

  • Token-based authentication: Automatically stores your CivitAI API token for future use.
  • Progress tracking: Shows download progress with speed in MB/s.
  • Error handling: Includes handling for common download errors like redirects and missing files.

API Token

The first time you use civitai_downloader, you'll be prompted to enter your CivitAI API token. This token will be stored in ~/.civitai/config. You can generate your API token from your CivitAI account settings.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Credits

gradio demo by - Eddycrack864

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

civitai_downloader-1.1.5.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

civitai_downloader-1.1.5-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file civitai_downloader-1.1.5.tar.gz.

File metadata

  • Download URL: civitai_downloader-1.1.5.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for civitai_downloader-1.1.5.tar.gz
Algorithm Hash digest
SHA256 ea85aa5035581079dabc36c4bdec3d8df4008f9450531de7e589e0a647124086
MD5 33782b1dc9ead3d59b02d8923e8de03b
BLAKE2b-256 67af593c9c082c3fe01c8e4ffefa4f565e7ed06f825fc075e7525ab656dcef97

See more details on using hashes here.

File details

Details for the file civitai_downloader-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for civitai_downloader-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 32418f475ea1f8cbd9acfd8e4371e0925c06a3314bbeb7113410569b81d5158a
MD5 39913d50a31c63175afc1c477f576e51
BLAKE2b-256 e0b61210a7e2b67c2a8ced602118d1355171f0ee9183faf3e5f68a92291deb2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page