Skip to main content

A package to download AI models for ComfyUI from the internet or from private GCS buckets

Project description

Comfy Model Download

Description

This package provides a simple way to download pre-trained models from the internet to use in your Comfy projects.

Installation

To install the package, you can use pip:

Testing version:

pip install -i https://test.pypi.org/simple/ comfy-model-download

Add next two lines to your requirements.txt file for the testing version:

--index-url https://test.pypi.org/simple/
comfy_model_download

Usage

It needed to provide a yaml file with the models to download and the path to save them. The package will download the models in parallel using the number of workers specified.

If the model must be download from GCS it is needed to provide a key file.

from comfy_model_download import ModelDownload

download = ModelDownload(
    config_file="models_config.yaml",
    max_workers=2,
    model_path="path/to/save/models",
    key_file="path/to/key/file",
)
download.start()

models.yaml

The models.yaml file should be in the root of the project and should have the following structure:

models:
  checkpoints:
    - name: JuggernautXL.safetensors
      url: gs://example_gcs_bucket/JuggernautXL.safetensors
      #force_download: true
    - name: AnimateLCM_sd15_t2v_lora.safetensors
      url: gs://example_gcs_bucket/AnimateLCM_sd15_t2v_lora.safetensors
      
  ipadapter:
    - name: ip-adapter-plus_sd15.safetensors
      url: gs://example_gcs_bucket/ip-adapter-plus_sd15.safetensors

  animatediff_models:
    - name: AnimateLCM_sd15_t2v.ckpt
      url: gs://example_gcs_bucket/AnimateLCM_sd15_t2v.ckpt

  ...

If the model is already downloaded and you want to force the download, you can use the force_download key.

The models can be downloaded from GCS or from the internet via HTTP.

License

MIT License

Copyright (c) 2024 Freepik Company, Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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

comfy_model_download-0.5.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

comfy_model_download-0.5.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file comfy_model_download-0.5.1.tar.gz.

File metadata

  • Download URL: comfy_model_download-0.5.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for comfy_model_download-0.5.1.tar.gz
Algorithm Hash digest
SHA256 508307486a338f6606d8fee38759532573c991950719778efe10cbceb69d35ff
MD5 6dbbf3859803d02868e233bd9eb8b102
BLAKE2b-256 814846ac532e9d868feaa35d42c0d66865e5bb57e5ad52f79ceee32b6b175e3c

See more details on using hashes here.

File details

Details for the file comfy_model_download-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for comfy_model_download-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5354a44e7e74f6834b6035438e16c15fa523e90548e67b94b5c58a3c037dd9b
MD5 30f87b6869c9b6502dca74f964d5b5a1
BLAKE2b-256 614432e09e76fff0b8f467069b8bce153c5093e2678b7e7232ded3412c0d2a36

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