AI Handler
This is a simple framework for running AI models. It makes use of the huggingface API which gives you a queue, threading, a simple API, and the ability to run Stable Diffusion and LLMs seamlessly from your local hardware.
This is not intended to be used as a standalone application.
It can easily be extended and used to power interfaces or it can be run from the command line.
AI Handler is a work in progress. It powers two projects at the moment, but may not be ready for general use.
Installation
This is a work in progress.
Pre-requisites
System requirements
- Windows 10+
- Python 3.10.8
- pip 23.0.1
- CUDA toolkit 11.7
- CUDNN 8.6.0.163
- Cuda capable GPU
- 16gb+ ram
For Windows, follow windows branch instructions
Install
pip install https://github.com/w4ffl35/diffusers/archive/refs/tags/v0.15.0.ckpt_fix_0.0.1.tar.gz
pip install aihandler
Optional
These are optional instructions for installing TensorRT and Deepspeed for Windows
Install Tensor RT:
- Download TensorRT-8.4.3.1.Windows10.x86_64.cuda-11.6.cudnn8.4
- Git clone TensorRT 8.4.3.1
- Follow their instructions to build TensorRT-8.4.3.1 python wheel
- Install TensorRT
pip install tensorrt-*.whl
Install Deepspeed:
- Git clone Deepspeed 0.8.1
- Follow their instructions to build Deepspeed python wheel
- Install Deepspeed `pip install deepspeed-*.whl
Environment variables
AIRUNNER_ENVIRONMENT-devorprod. Defaults todev. This controls the LOG_LEVELLOG_LEVEL-FATALfor production,DEBUGfor development. Override this to force a log level
Huggingface variables
Offline mode
These environment variables keep you offline until you need to download a model. This prevents unwanted online access and speeds up usage of huggingface libraries.
DISABLE_TELEMETRYKeep this set to 1 at all times. Huggingface collects minimal telemetry when downloading a model from their repository but this will keep it disabled. See more info in this github threadHF_HUB_OFFLINEWhen loading a diffusers model, huggingface libraries will attempt to download an updated cache before running the model. This prevents that check from happening (long with a boolean passed toload_pretrainedsee the runner.py file for examples)TRANSFORMERS_OFFLINESimilar toHF_HUB_OFFLINEbut for transformers models
Metadata
Release files for aihandler 1.19.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aihandler-1.19.0.tar.gz | 54.5 kB | Without provenance | Details for aihandler-1.19.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aihandler-1.19.0-py3-none-any.whl | Python 3 | none | any | Details for aihandler-1.19.0-py3-none-any.whl |
Total release size: 115.8 kB
Release files / aihandler-1.19.0.tar.gz
| Download URL | aihandler-1.19.0.tar.gz |
|---|---|
| Size | 54.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09cab787b5b54bd8d2a6f7c475c5693ba3e0f21d94a2261734ef66450ca4f829
|
|
BLAKE2b-256 checksum How to use checksums |
17c9b6a9cdfa9389b7a7989cd3bfa284c8ada70e972668f2d7910ef31addee95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / aihandler-1.19.0-py3-none-any.whl
| Download URL | aihandler-1.19.0-py3-none-any.whl |
|---|---|
| Size | 61.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f2c434a9f13e51fedd4639df4bb5717180eb15a8dfb2bf2d3f59b728ff5af19
|
|
BLAKE2b-256 checksum How to use checksums |
7e2c3f79edb53ddd7906ef53a9ab26267fb3aa5bbb8993c162ad4536d6ecaf06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for aihandler 1.19.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.