Git Product home page Git Product logo

civitai_downloader's Introduction


Logo

A script using Civitai's REST-API-Reference


Contents

(back to top)

Pre-Requisites

This is an example of how to list things you need to use the software and how to install them.

  • python 3.9 +

Installation

  1. Clone the repo
    git clone https://github.com/axsddlr/civitai_downloader.git
  2. python
    python -m pip install -r requirements.txt

(back to top)

config.json

  1. go to your Civitai account and go to Settings > API
  2. create a name for your api key and click Save
  3. copy the api key and paste it into example.config.json replacing <api key here>
  4. rename example.config.json to config.json
{
  "civitai_api_key": "<api key here>"
}

menu1.png menu2.png menu3.png menu4.png

(back to top)

Usage

python main.py

extra options

python main.py -h

(back to top)

Credits

Clicky#6060 (initial creation idea)

TODO

 1. auto download a preview image from item in API for each downloaded file
 2. allow user to specify if they want to download pickletensor or safetensors files
 3. allow user to specify if they want to download pruned version of the files
 4. sql database to store all downloaded files info

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

civitai_downloader's People

Contributors

axsddlr avatar sashaok123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

civitai_downloader's Issues

Found 0 Models

I followed setup steps, saved config with api key to config.json etc. however when I run nothing seems to happen when I run with python main.py --verbose I get the following. Any help is much appreciated, thank you!

==================================================
Running civitai_download.py v0.0.2

Found 0 models

Request failed with status code 500

First and foremost! thank you for creating something simple here for us less savvy API knowledge folks.

Below is the error I get when trying to run "python main.py"

Request failed with status code 500 Traceback (most recent call last): File "J:\Civitai\civitai_downloader\main.py", line 224, in <module> asyncio.run(main()) File "J:\SD-WebUI\Python3.10.6-installed\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "J:\SD-WebUI\Python3.10.6-installed\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "J:\Civitai\civitai_downloader\main.py", line 214, in main files_as_objects = await get_all_files() File "J:\Civitai\civitai_downloader\main.py", line 201, in get_all_files _, _, _, modelver_list = await map_api() File "J:\Civitai\civitai_downloader\main.py", line 79, in map_api file_type = [model["type"] for model in all_models] TypeError: 'NoneType' object is not iterable

Interesting enough I think its part API call fail? and something to do with line 79 "all_models"?
any support would be greatly appreciative!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.