biniou
biniou copied to clipboard
a self-hosted webui for 30+ generative ai
Home
biniou is a self-hosted webui for several kinds of GenAI (generative artificial intelligence). You can generate multimedia contents with AI and use a chatbot on your own computer, even without dedicated GPU and starting from 8GB RAM. Can work offline (once deployed and required models downloaded).
GNU/Linux [ RHEL base | Debian base ] • Windows • macOS (experimental) • Docker | Documentation | Showroom
Updates
-
🆕 2024-03-29 : 🔥 New Chatbot model 🔥 : Adding model Lewdiculous/Kunoichi-DPO-v2-7B-GGUF-Imatrix to Chatbot module. This model has been quantized using a GGUF-Imatrix quantizations, which seems to make a real difference in terms of speed and accuracy. Also, the base model is pretty good, especially at roleplaying. Really worth trying.
-
🆕 2024-03-28 : 🔥 SDXL models support for ip-composition-adapter 🔥 : SDXL models are now usables with ip-composition-adapter in the IP-Adapter module.
-
🆕 2024-03-27 :
- 🔥 Updates for Text2Video-Zero module 🔥 : Adding model SG161222/RealVisXL_V4.0_Lightning and modifying settings to apply defaults SD1.5 and SDXL sizes.
- 🔥 Updates for Instruct pix2pix module 🔥 : Adding models instruction-tuning-sd/low-level-img-proc and instruction-tuning-sd/cartoonizer. The first one can be used to derain, denoise, deblur or enhance low-light image. The second one can cartoonize an image. See here for more informations.
-
🆕 2024-03-26 : 🔥 New Stable Diffusion SDXL model 🔥 : Adding model SG161222/RealVisXL_V4.0_Lightning to modules Stable Diffusion, img2img, IP-Adapter, ControlNet and Photobooth. This flavor of Realistic Vision can produces qualitatives outputs in only 4 steps, which halves the average generation time for a SDXL model.
-
🆕 2024-03-24 : 🔥 New Stable Diffusion SDXL anime model 🔥 : Adding model cagliostrolab/animagine-xl-3.1 to modules Stable Diffusion, img2img, IP-Adapter, ControlNet, Photobooth and Text2Video-Zero. This SDXL model generates awesome anime style contents.
Menu
• Features
• Prerequisites
• Installation
GNU/Linux
Rocky 9.3 / Alma 9.3 / CentOS Stream 9
Debian 12 / Ubuntu 22.04.3 / Linux Mint 21.2
Windows 10 / Windows 11
macOS Homebrew install
Dockerfile
• CUDA support
• How To Use
• Good to know
• Credits
• License
Features
-
Text generation using :
- ✍️ llama-cpp based chatbot module (uses .gguf models)
- 👁️ Llava multimodal chatbot module (uses .gguf models)
- 👁️ Microsoft GIT image captioning module
- 👂 Whisper speech-to-text module
- 👥 nllb translation module (200 languages)
- 📝 Prompt generator (require 16GB+ RAM for ChatGPT output type)
-
Image generation and modification using :
- 🖼️ Stable Diffusion module
- 🖼️ Kandinsky module (require 16GB+ RAM)
- 🖼️ Latent Consistency Models module
- 🖼️ Midjourney-mini module
- 🖼️PixArt-Alpha module
- 🖌️ Stable Diffusion Img2img module
- 🖌️ IP-Adapter module
- 🖼️ Stable Diffusion Image variation module (require 16GB+ RAM)
- 🖌️ Instruct Pix2Pix module
- 🖌️ MagicMix module
- 🖌️ Stable Diffusion Inpaint module
- 🖌️ Fantasy Studio Paint by Example module (require 16GB+ RAM)
- 🖌️ Stable Diffusion Outpaint module (require 16GB+ RAM)
- 🖼️ Stable Diffusion ControlNet module
- 🖼️ Photobooth module
- 🎭 Insight Face faceswapping module
- 🔎 Real ESRGAN upscaler module
- 🔎GFPGAN face restoration module
-
Audio generation using :
- 🎶 MusicGen module
- 🎶 MusicGen Melody module (require 16GB+ RAM)
- 🎶 MusicLDM module
- 🔊 Audiogen module (require 16GB+ RAM)
- 🔊 Harmonai module
- 🗣️ Bark module
-
Video generation and modification using :
- 📼 Modelscope module (require 16GB+ RAM)
- 📼 Text2Video-Zero module
- 📼 AnimateLCM module (require 16GB+ RAM)
- 📼 Stable Video Diffusion module (require 16GB+ RAM)
- 🖌️ Video Instruct-Pix2Pix module (require 16GB+ RAM)
-
3D objects generation using :
- 🧊 Shap-E txt2shape module
- 🧊 Shap-E img2shape module (require 16GB+ RAM)
-
Other features
- Zeroconf installation through one-click installers or Windows exe.
- Easy management through a control panel directly inside webui : update, restart, shutdown, activate authentication, control network access or share your instance online with a single click.
- Communication between modules : send an output as an input to another module
- Powered by 🤗 Huggingface and gradio
- Cross platform : GNU/Linux, Windows 10/11 and macOS(experimental, via homebrew)
- Convenient Dockerfile for cloud instances
- Support for CUDA on almost all modules (see CUDA support)
- Experimental support for ROCm on almost all modules (see here)
- Support for Stable Diffusion SD-1.5, SD-2.1, SD-Turbo, SDXL, SDXL-Turbo, LCM, VegaRT, Segmind SSD-1B, Segmind Vega and compatible models, through built-in model list or standalone .safetensors files
- Support for LoRA models
- Support for textual inversion
- Support for Llama, Mistral, Mixtral and compatible GGUF quantized models, through built-in model list or standalone .gguf files.
- Easy copy/paste integration for TheBloke GGUF quantized models.
Prerequisites
-
Minimal hardware :
- 64bit CPU
- 8GB RAM
- Storage requirements :
- for GNU/Linux : at least 20GB for installation without models.
- for Windows : at least 30GB for installation without models.
- for macOS : at least ??GB for installation without models.
- Storage type : HDD
- Internet access (required only for installation and models download) : unlimited bandwith optical fiber internet access
-
Recommended hardware :
- Massively multicore 64bit CPU
- 16GB+ RAM
- Storage requirements :
- for GNU/Linux : around 200GB for installation including all defaults models.
- for Windows : around 200GB for installation including all defaults models.
- for macOS : around ??GB for installation including all defaults models.
- Storage type : SSD Nvme
- Internet access (required only for installation and models download) : unlimited bandwith optical fiber internet access
-
Operating system :
- a 64 bit OS :
- Debian 12
- Ubuntu 22.04.3
- Linux Mint 21.2
- Windows 10 22H2
- Windows 11 22H2
- macOS ???
- a 64 bit OS :
Note : biniou support Cuda or ROCm but does not require a dedicated GPU to run. You can install it in a virtual machine.
Installation
GNU/Linux
Rocky 9.3 / Alma 9.3 / CentOS Stream 9
One-click installer :
- Copy/paste and execute the following command in a terminal :
sh <(curl https://raw.githubusercontent.com/Woolverine94/biniou/main/oci-rhel.sh || wget -O - https://raw.githubusercontent.com/Woolverine94/biniou/main/oci-rhel.sh)
Debian 12 / Ubuntu 22.04.3 / Linux Mint 21.2+
One-click installer :
- Copy/paste and execute the following command in a terminal :
sh <(curl https://raw.githubusercontent.com/Woolverine94/biniou/main/oci-debian.sh || wget -O - https://raw.githubusercontent.com/Woolverine94/biniou/main/oci-debian.sh)
Manual installation :
- Install the pre-requisites as root :
apt install git pip python3 python3-venv gcc perl make ffmpeg openssl
- Clone this repository as user :
git clone https://github.com/Woolverine94/biniou.git
- Launch the installer :
cd ./biniou
./install.sh
- (optional, but highly recommended) Install TCMalloc as root to optimize memory management :
apt install google-perftools
Windows 10 / Windows 11
Windows installation has more prerequisites than GNU/Linux one, and requires following softwares (which will be installed automatically) :
- Git
- Python
- OpenSSL
- Visual Studio Build tools
- Windows 10/11 SDK
- Vcredist
- ffmpeg
- ... and all their dependencies.
It's a lot of changes on your operating system, and this could potentially bring unwanted behaviors on your system, depending on which softwares are already installed on it.
⚠️ You should really make a backup of your system and datas before starting the installation process. ⚠️
-
Download and execute : biniou_netinstall.exe
OR
-
Download and execute : install_win.cmd (right-click on the link and select "Save Target/Link as ..." to download)
All the installation is automated, but Windows UAC will ask you confirmation for each software installed during the "prerequisites" phase. You can avoid this by running the choosen installer as administrator.
macOS Homebrew install
⚠️ Homebrew install is theoretically compatible with macOS, but has not been tested. Use at your own risk. Any feedback on this procedure through discussions or an issue ticket will be really appreciated. ⚠️
-
Install Homebrew for your operating system
-
Install required homebrew "bottles" :
brew install git python3 gcc gcc@11 perl make ffmpeg openssl
- Install python virtualenv :
python3 -m pip install virtualenv
- Clone this repository as user :
git clone https://github.com/Woolverine94/biniou.git
- Launch the installer :
cd ./biniou
./install.sh
Dockerfile
These instructions assumes that you already have a configured and working docker environment.
- Create the docker image :
docker build -t biniou https://github.com/Woolverine94/biniou.git
or, for CUDA support :
docker build -t biniou https://raw.githubusercontent.com/Woolverine94/biniou/main/CUDA/Dockerfile
- Launch the container :
docker run -it --restart=always -p 7860:7860 \
-v biniou_outputs:/home/biniou/biniou/outputs \
-v biniou_models:/home/biniou/biniou/models \
-v biniou_cache:/home/biniou/.cache/huggingface \
-v biniou_gfpgan:/home/biniou/biniou/gfpgan \
biniou:latest
or, for CUDA support :
docker run -it --gpus all --restart=always -p 7860:7860 \
-v biniou_outputs:/home/biniou/biniou/outputs \
-v biniou_models:/home/biniou/biniou/models \
-v biniou_cache:/home/biniou/.cache/huggingface \
-v biniou_gfpgan:/home/biniou/biniou/gfpgan \
biniou:latest
-
Access the webui by the url :
https://127.0.0.1:7860 or https://127.0.0.1:7860/?__theme=dark for dark theme (recommended)
... or replace 127.0.0.1 by ip of your container
Note : to save storage space, the previous container launch command defines common shared volumes for all biniou containers and ensure that the container auto-restart in case of OOM crash. Remove
--restart
and-v
arguments if you didn't want these behaviors.
CUDA support
biniou is natively cpu-only, to ensure compatibility with a wide range of hardware, but you can easily activate CUDA support through Nvidia CUDA (if you have a functionnal CUDA 12.1 environment) or AMD ROCm (if you have a functionnal ROCm 5.6 environment) by selecting the type of optimization to activate (CPU, CUDA or ROCm for Linux), in the WebUI control module.
Currently, all modules except Chatbot, Llava and faceswap modules, could benefits from CUDA optimization.
How To Use
- Launch by executing from the biniou directory :
- for GNU/Linux :
cd /home/$USER/biniou
./webui.sh
- for Windows :
Double-click webui.cmd in the biniou directory (C:\Users\%username%\biniou\). When asked by the UAC, configure the firewall according to your network type to authorize access to the webui
Note : First start could be very slow on Windows 11 (comparing to others OS).
-
Access the webui by the url :
https://127.0.0.1:7860 or https://127.0.0.1:7860/?__theme=dark for dark theme (recommended)
You can also access biniou from any device (including smartphones) on the same LAN/Wifi network by replacing 127.0.0.1 in the url with biniou host ip address. -
Quit by using the keyboard shortcut CTRL+C in the Terminal
-
Update this application (biniou + python virtual environment) by using the WebUI control updates options.
Good to know
-
Most frequent cause of crash is not enough memory on the host. Symptom is biniou program closing and returning to/closing the terminal without specific error message. You can use biniou with 8GB RAM, but 16GB at least is recommended to avoid OOM (out of memory) error.
-
biniou use a lot of differents AI models, which requires a lot of space : if you want to use all the modules in biniou, you will need around 200GB of disk space only for the default model of each module. Models are downloaded on the first run of each module or when you select a new model in a module and generate content. Models are stored in the directory /models of the biniou installation. Unused models could be deleted to save some space.
-
... consequently, you will need a fast internet access to download models.
-
A backup of every content generated is available inside the /outputs directory of the biniou folder.
-
biniou natively only rely on CPU for all operations. It use a specific CPU-only version of PyTorch. The result is a better compatibility with a wide range of hardware, but degraded performances. Depending on your hardware, expect slowness. See here for Nvidia CUDA support and AMD ROCm experimental support (GNU/Linux only).
-
Defaults settings are selected to permit generation of contents on low-end computers, with the best ratio performance/quality. If you have a configuration above the minimal settings, you could try using other models, increase media dimensions or duration, modify inference parameters or others settings (like token merging for images) to obtain better quality contents.
-
biniou is licensed under GNU GPL3, but each model used in biniou has its own license. Please consult each model license to know what you can and cannot do with the models. For each model, you can find a link to the huggingface page of the model in the "About" section of the associated module.
-
Don't have too much expectations : biniou is in an early stage of development, and most open source software used in it are in development (some are still experimentals).
-
Every biniou modules offers 2 accordions elements About and Settings :
- About is a quick help features that describes the module and give instructions and tips on how to use it.
- Settings is a panel setting specific to the module that let you configure the generation parameters.
Credits
This application uses the following softwares and technologies :
- 🤗 Huggingface : Diffusers and Transformers libraries and almost all the generatives models.
- Gradio : webUI
- llama-cpp-python : python bindings for llama-cpp
- Llava
- BakLLava
- Microsoft GIT : Image2text
- Whisper : speech2text
- nllb translation : language translation
- Stable Diffusion : txt2img, img2img, Image variation, inpaint, ControlNet, Text2Video-Zero, img2vid
- Kandinsky : txt2img
- Latent consistency models : txt2img
- PixArt-Alpha : PixArt-Alpha
- IP-Adapter : IP-Adapter img2img
- Instruct pix2pix : pix2pix
- MagicMix : MagicMix
- Fantasy Studio Paint by Example : paintbyex
- Controlnet Auxiliary models : preview models for ControlNet module
- IP-Adapter FaceID : Adapter model for Photobooth module
- Photomaker Adapter model for Photobooth module
- Insight Face : faceswapping
- Real ESRGAN : upscaler
- GFPGAN : face restoration
- Audiocraft : musicgen, musicgen melody, audiogen
- MusicLDM : MusicLDM
- Harmonai : harmonai
- Bark : text2speech
- Modelscope text-to-video-synthesis : txt2vid
- AnimateLCM : txt2vid
- Open AI Shap-E : txt2shape, img2shape
-
compel : Prompt enhancement for various
StableDiffusionPipeline
-based modules -
tomesd : Token merging for various
StableDiffusionPipeline
-based modules - Python
- PyTorch
- Git
- ffmpeg
... and all their dependencies
License
GNU General Public License v3.0
GitHub @Woolverine94 ·