0
GitHub - fvsionai/fvsion
source link: https://github.com/fvsionAI/fvsion
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
About
Fvsion
, pronouncedFusion
is a quick bundle ofFastAPI
+Vite and Vue
+Stable Diffusion
with async first design.- Built on top of electron-vite-vue-fastapi boilerplate.
Features & Motivation
- Independent frontend and backend, choose what you need and as you need.
- Image generation is sent asynchronously to the fastAPI engine, allowing for automatic queue.
- Flexible api modules to allow ease of use to add your own or publically shared modules, without interference with UI.
- Integration with Node for faster prototyping.
- Versatile UI in Vue & Electron.
- Cross platform features incoming via Electron and packaged pyInstaller (coming soon).
Beginner Friendly Installation
- Windows Installer/Executable (Coming Soon)
- Linux and MacOS not yet supported
Development Installation
- Make sure you have git, python 3.10.7 & virtualenv installed.
- Clone git via
git clone https://github.com/fvsionai/fvsion.git <folder-name>
. Replaced<folder-name>
with your desired folder name. - Navigate to the newly created folder
cd <folder-name>
- Download diffusers model as per instruction below: [Link](# Diffusers Model Download)
- Make sure you are in the root folder and create virtualenv local folders
python -m virtualenv .venv
- Activate your virtualenv by using
.venv/scripts/activate
- Install python requirement using
pip install -r py/requirements.txt
- Run
python py/main.py
& go tohttp://localhost:4242/docs
to confirm server is running. - You can start generating image by directly interacting with the built in SwaggerAPI. Click "CTRL + C" while in terminal to close the server when you are done.
- For a proper front end, need to install npm requirement using
npm i
- Development run via
npm run dev
- (Optional) You can run
npm run build
to generate standalone exe files. Do note however it might take a while (~30 minutes on AMD Ryzen 5 1600), especially for the first run. - (Recommended) Please send PR for any improvement suggestions. Very much welcomed.
Diffusers Model Download
- There are two options as of today, either download manually by going to huggingface website, or using
git lfs
to handle large files. Note that the whole files total up to >5 GB git lfs install
andcd models
Or navigate to thefvsion/models
folder.git clone https://huggingface.co/CompVis/stable-diffusion-v1-4
. There will be prompt asking for your huggingface id and password for the first time.- (Optional) Login to
huggingface.co
and navigate tohttps://huggingface.co/CompVis/stable-diffusion-v1-4/tree/main
. - (Optional) Downloads
stable-diffusion-v1-4
whole folder fromhttps://huggingface.co/CompVis/stable-diffusion-v1-4/tree/main
and copy tomodels/stable-diffusion-v1-4
. - Once completed please ensure that you are in the root directory.
Known Issues
- There might be undeleted temporary files in
C:\Users\test\AppData\Local\Temp
. Please check if you storage is heavily used. Do note that diffusers libary tend to cache files to speed up operation which also use some amount of data. More details here. - UX: Minimal loading indicator when loading generation.
Contributors
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK