What's new

Stable Diffusion AI: Options to run using CPU-only to Low GPU specs, Android, etc.

Heto, may update para medyo bumilis yung image generation:
You do not have permission to view the full content of this post. Log in or register now. (latest update 2 days ago)
===============================================================================================
FastSD CPU is a faster version of Stable Diffusion on CPU. Based on You do not have permission to view the full content of this post. Log in or register now.. The following interfaces are available :

  • Desktop GUI (Qt)
  • WebUI
  • CLI (CommandLine Interface)
Using OpenVINO, it took 7 seconds to create a single 512x512 image on a Core i7-12700.

Supported platforms​

  • Windows
  • Linux
  • Mac
  • Raspberry PI 4
You do not have permission to view the full content of this post. Log in or register now.

Features​

  • Supports 256,512,768 image sizes
  • Supports Windows and Linux
  • Saves images and diffusion setting used to generate the image
  • Settings to control,steps,guidance and seed
  • Added safety checker setting
  • Maximum inference steps increased to 25
  • Added You do not have permission to view the full content of this post. Log in or register now. support
  • Added web UI
  • Added CommandLine Interface(CLI)
  • Fixed OpenVINO image reproducibility issue
  • Fixed OpenVINO high RAM usage,thanks You do not have permission to view the full content of this post. Log in or register now.
  • Added multiple image generation support
  • Application settings
  • Added Tiny Auto Encoder for SD (TAESD) support, 1.4x speed boost (Fast,moderate quality)
  • Safety checker disabled by default
  • Added SDXL,SSD1B - 1B LCM models
  • Added LCM-LoRA support, works well for fine-tuned Stable Diffusion model 1.5 or SDXL models
  • Added negative prompt support in LCM-LoRA mode
  • LCM-LoRA models can be configured using text configuration file
  • Added support for custom models for OpenVINO (LCM-LoRA baked)
  • OpenVINO models now supports negative prompt (Set guidance >1.0)
  • Real-time inference support,generates images while you type (experimental)
  • Fast 2,3 steps inference
  • Lcm-Lora fused models for faster inference
  • Supports integrated GPU(iGPU) using OpenVINO (export DEVICE=GPU)
  • 5.7x speed using OpenVINO(steps: 2,tiny autoencoder)

2 Steps fast inference​

FastSD CPU supports 2 to 3 steps fast inference using LCM-LoRA workflow. It works well with SD 1.5 models.

You do not have permission to view the full content of this post. Log in or register now.

OpenVINO support​

Thanks You do not have permission to view the full content of this post. Log in or register now. for the OpenVINO model contribution. We can get 2x speed improvement when using OpenVINO. Thanks You do not have permission to view the full content of this post. Log in or register now. for the conversion script.

Convert SD 1.5 models to OpenVINO LCM-LoRA fused models​

We first creates LCM-LoRA baked in model,replaces the scheduler with LCM and then converts it into OpenVINO model. For more details check You do not have permission to view the full content of this post. Log in or register now., you can use this tools to convert any StableDiffusion 1.5 fine tuned models to OpenVINO.

Real-time text to image (EXPERIMENTAL)​

Now we can generate near real-time text to images using FastSD CPU.

CPU (OpenVINO)

Near real-time inference on CPU using OpenVINO, run the start-realtime.bat batch file and open the link in brower (Resolution : 256x256,Latency : 2.3s on Intel Core i7)

Colab (GPU)

You can use the colab to generate real-time images (Resolution : 512x512,Latency : 500ms on Tesla T4) You do not have permission to view the full content of this post. Log in or register now.

Watch YøùTùbé video :

IMAGE_ALT

Models​

Fast SD supports LCM models and LCM-LoRA models.

LCM Models​

Following LCM models are supported:

  • LCM_Dreamshaper_v7 - You do not have permission to view the full content of this post. Log in or register now. by You do not have permission to view the full content of this post. Log in or register now.
  • SSD-1B -LCM distilled version of You do not have permission to view the full content of this post. Log in or register now.
  • StableDiffusion XL -LCM distilled version of You do not have permission to view the full content of this post. Log in or register now.

OpenVINO models​

These are LCM-LoRA baked in models.

LCM-LoRA models​

  • lcm-lora-sdv1-5 - distilled consistency adapter for You do not have permission to view the full content of this post. Log in or register now.
  • lcm-lora-sdxl - Distilled consistency adapter for You do not have permission to view the full content of this post. Log in or register now.
  • lcm-lora-ssd-1b - Distilled consistency adapter for You do not have permission to view the full content of this post. Log in or register now.
❗ Currently no support for OpenVINO LCM-LoRA models.

How to add new LCM-LoRA models​

To add new model follow the steps: For example we will add wavymulder/collage-diffusion, you can give Stable diffusion 1.5 Or SDXL,SSD-1B fine tuned models.

  1. Open configs/stable-diffusion-models.txt file in text editor.
  2. Add the model ID wavymulder/collage-diffusion or locally cloned path.
Updated file as shown below :

Fictiverse/Stable_Diffusion_PaperCut_Model
stabilityai/stable-diffusion-xl-base-1.0
runwayml/stable-diffusion-v1-5
segmind/SSD-1B
stablediffusionapi/anything-v5
wavymulder/collage-diffusion


Similarly we can update configs/lcm-lora-models.txt file with lcm-lora ID.

How to use LCM-LoRA models offline​

Please follow the steps to run LCM-LoRA models offline :

  • In the settings ensure that "Use locally cached model" setting is ticked.
  • Download the model for example latent-consistency/lcm-lora-sdv1-5 Run the following commands:
git lfs install
git clone You do not have permission to view the full content of this post. Log in or register now.


Copy the cloned model folder path for example "D:\demo\lcm-lora-sdv1-5" and update the configs/lcm-lora-models.txt file as shown below :

D:\demo\lcm-lora-sdv1-5
latent-consistency/lcm-lora-sdxl
latent-consistency/lcm-lora-ssd-1b


  • Open the app and select the newly added local folder in the combo box menu.
  • That's all!

FastSD CPU on Windows​

❗You must have a working Python installation.(Recommended : Python 3.10 or 3.11 )

Clone/download this repo or download release.

Installation​

  • Double click install.bat (It will take some time to install,depending on your internet speed.)

Run​

You can run in desktop GUI mode or web UI mode.

Desktop GUI​

  • To start desktop GUI double click start.bat

Web UI​

  • To start web UI double click start-webui.bat

FastSD CPU on Linux​

Ensure that you have Python 3.8 or higher version installed.

  • Clone/download this repo
  • In the terminal, enter into fastsdcpu directory
  • Run the following command
    chmod +x install.sh
    ./install.sh

To start Desktop GUI​

./start.sh

To start Web UI​

./start-webui.sh

FastSD CPU on Mac​

You do not have permission to view the full content of this post. Log in or register now.

Installation​

Ensure that you have Python 3.8 or higher version installed.

  • Clone/download this repo
  • In the terminal, enter into fastsdcpu directory
  • Run the following command
    chmod +x install-mac.sh
    ./install-mac.sh

To start Desktop GUI​

./start.sh

To start Web UI​

./start-webui.sh

Thanks You do not have permission to view the full content of this post. Log in or register now.for Mac testing.

❗We don't support OpenVINO on Mac.

If you want to increase image generation speed on Mac(M1/M2 chip) try this:

export DEVICE=mps and start app start.sh

Web UI screenshot​

You do not have permission to view the full content of this post. Log in or register now.

Google Colab​

Due to the limitation of using CPU/OpenVINO inside colab, we are using GPU with colab. You do not have permission to view the full content of this post. Log in or register now.

CLI mode (Advanced users)​

You do not have permission to view the full content of this post. Log in or register now.

Open the terminal and enter into fastsdcpu folder. Activate virtual environment using the command:

Windows users :​

(Suppose FastSD CPU available in the directory "D:\fastsdcpu") D:\fastsdcpu\env\Scripts\activate.bat

Linux users:​

source env/bin/activate

Start CLI src/app.py -h

Raspberry PI 4 support​

Thanks WGNW_MGM for Raspberry PI 4 testing.FastSD CPU worked without problems. System configuration - Raspberry Pi 4 with 4GB RAM, 8GB of SWAP memory.

License​

The fastsdcpu project is available as open source under the terms of the You do not have permission to view the full content of this post. Log in or register now.
=================================================================================================

Note:
Ito ay para sa mga sanay gumamit ng Stable Diffusion UIs dito sa thread right from the start.
Basahin nyo muna yung information to get it working properly. May guides naman dyan.
Multi-platform siya kaya maraming options to run it, pero kailangan nyo lang i-convert to You do not have permission to view the full content of this post. Log in or register now.format yung checkpoints/safetensors using provided tool kung gagamit kayo ng iba bukod sa LCM models and LCM-LoRA models na binigay dito.
Check ninyo yung clone nya na ginawa ni You do not have permission to view the full content of this post. Log in or register now. at You do not have permission to view the full content of this post. Log in or register now.. Mas simple, but functions the same as this.
Experiemental po ito at straight AI generator without option to add extensions or plugins. Ang purpose lang po nito ay pabilisin yung generation using cpu only. Ang benchmark po ay ito:

Using OpenVINO, it took 7 seconds to create a single 512x512 image on a Core i7-12700.
 
Complementing the last post, this free option will give you the full package on image generation, and processing (including enhancement, upscaling, filtering, etc. by just using GIMP + your selected plugins. Pwede itong GPU or CPU mode.
---------------------------------------------------------------------------------------------
You do not have permission to view the full content of this post. Log in or register now.: GIMP AI plugins with OpenVINO Backend
Current list of plugins:
[1] Super-Resolution
[2] Style-Transfer
[3] Inpainting
[4] Semantic-Segmentation
[5] Stable-Diffusion (Suppports - SD 1.4, SD 1.5 (landscape & portrait), SD 1.5 Inpainting, SD 1.5 Controlnet-OpenPose, SD 1.5 Controlnet-CannyEdge)
Objectives
[1] Provides a set of OpenVino based plugins that add AI features to GIMP.
[2] Serve as a refrence code for how to make use of OpenVino in GIMP application for inferencing on Intel's' CPU & GPU
[3] Add AI to routine image editing workflows.
---------------------------------------------------------------------------------------------
Follow the guide and you' can use the OpenVINO plugins locally inside GIMP.
For other good GIMP plugins, you can try adding them depending on your preference using these links
You do not have permission to view the full content of this post. Log in or register now.
You do not have permission to view the full content of this post. Log in or register now.
Kung gusto ninyo ng separatete, standalone apps, just try searching for image enhancer, image enhancement, image upscaler, image upscaling, upscaler, image denoising, etc... sa You do not have permission to view the full content of this post. Log in or register now.. May mga installer naman yan. Itong You do not have permission to view the full content of this post. Log in or register now. ang isang sample pero Vulcan GPU and preference kaya best is use You do not have permission to view the full content of this post. Log in or register now. (recommended for most models dahil complete siya with super resolution, face restoration, denoising, inpainting, background removal...).
Best is read infos about upscaling (image or videos) on these links, dahil ito rin ang gamit ng mga online services sa ngayon - ρáíd and free:
You do not have permission to view the full content of this post. Log in or register now.
You do not have permission to view the full content of this post. Log in or register now.
Check ninyo dyan yung model database and dataset database (kung mag-train kayo ng models ninyo). Yang mga models dyan ay pwedeng gamitin din sa SD.
Nasa inyo na lang yung option to learn how to use them and advance to other branches like computer vision, video upscaling.enhancing, animating images, real-time upscaling in games (using Magpie) and many more. Actually, para na rin may Lightroom and Photoshop he he.
 

Users search this thread by keywords

  1. Gimp
Back
Top