Package: civitdl
civitdl (civitai-batch-download)(QUICK NOTE: CivitAI seems to have changed their API so that it will require an API key for all model downloads, please seeAPI Key Pagefor instructions)Note v2 has some changes regarding the cli args of the program. Please read the README below or runcivitdl --helpfor the new arguments!To see changes to v2, go toChanges in v2section.Uses CLI to batch download Stable Diffusion models, metadata (including description of model, author, base model, example prompts and etc.) and example images (default is 3) of checkpoints, loras, and TI models from civitai!One thing to note is that for sfw models, currently, the program is set to only download sfw images. Please note that there may be sfw models that are rated as nsfw by CivitAI (and vice versa).NavigateREADME PageAlias PageAPI Key PageCivitconfig / Configuration PageCivitdl PageSorter PageTable Of Contentscivitdl (civitai-batch-download)NavigateTable Of ContentsGetting StartedDependenciesInstallingInstall using PIPBuild from source 1Build from source 2 (if the instruction above fails with UNKNOWN package installed, else ignore this section)Quick StartConfiguration Program Options - civitconfigChanges in v2 from v1TroubleshootingContributingLicenseGetting StartedDependenciesPython3.8 or aboverequirements.txtInstallingInstall using PIPpip3installcivitdl# pip install civitdl # if pip3 is not foundBuild from source 1gitclonehttps://github.com/OwenTruong/civitdl.git# Clone the projectcdcivitdl# CD into project directorypip3install.# Use pip if pip3 is not foundBuild from source 2 (if the instruction above fails with UNKNOWN package installed, else ignore this section)# Make sure you are in project directory # use pip if pip3 is not foundpython3-mbuild
pip3install-r./requirements.txt
pip3install--upgradedist/*.whlQuick StartTo get started quickly, copy the command below.Seecivitdl docfor more info.civitdl123456./modelsReplace123456your model of choice (it can be a civitai.com url or model id).Replace./modelswith the directory you wish to download the model to.Configuration Program Options - civitconfigConfiguring the program might make your life easier. You would be able to set default sorter, max images, and api key to use without running any of those options in the main program!You would also be able to add and delete sorters and aliases from the program.Checkcivitconfig doc.Runcivitconfig --helpto check what options are available!Changes in v2 from v1basic and tags sorter now downloads metadata and images to/parent_dir/extra_data/instead of to/parent_dir/Sorter is now more flexible/customizable (i.e. able to select individual paths model, metadata and images should go to)Added support for providing API Key to program to download restricted models.Seeapi key docAdded multiple new options to the main program, civitdl.Seecivitdl docAdded configuration to set defaults for options, and to create alias + sorters.Seecivitconfig docConcurrently download images.Isolates each image's prompt/metadata from the model's metadata.Able to retry download if model fails initially.Faster requests.Added features to skip model download if model already exists in path, or locally in cache.TroubleshootingIf you encounter similar warning on Linux/Windows while building and installing manually:WARNING:Thescriptcivitdlisinstalledin'/home/OwenTruong/.local/bin'whichisnotonPATH.ConsideraddingthisdirectorytoPATHor,ifyouprefertosuppressthiswarning,use--no-warn-script-location.For Linux, please concat the path to your PATH env, example:echo'PATH="$HOME/.local/bin:"$PATH'>>~/.bashrcsource~/.bashrcFor Windows, this may help:https://www.computerhope.com/issues/ch000549.htmIf you are building from source and the following packages are not availablesetuptools, wheel, build, please install them withpip install setuptools wheel buildContributingThanks for the interest in the project!Please create an issue if you encounter any problem, bugs or if you have a feature request.To debug things, it is recommended to run with--verboseoption.Running in verbose allows users to print tracebacks and other messages useful for debugging.Example:civitdl 123456 ./models --verboseTo work on an issue:Please create a fork.Then clone your fork locally.Then create a local branch that describes the issue.Once you have commited your changes, push the branch to your forked repository.Then open a pull request to this repository.LicenseThis project is licensed under the Apache License 2.0 - see theLICENSE.mdfile for details