Sign In

Stable Diffusion XL with only 3GB of VRam - A1111 Portable

53
Stable Diffusion XL with only 3GB of VRam - A1111 Portable

Here is a modified version of A1111 standalone/portable (for which no installation is needed).

This version allows you to use Stable Diffusion XL with a graphics card equipped with only 3GB of VRam

Thanks to my friend nuaion for providing me with the configuration and related files.


RELEASE NOTES:


indrema light 1.0 - 18/07/24

- First Release


indrema light 2.0 - 24/07/24

Added:

  • ADetailer (with the templates already included and no download required)

  • VAE for both SD1.5 and XL (optimized, no NaN errors)

  • Model for SD 1.5 AniThing V3.0 Pruned (so during startup it doesn't let you download the standard Stable Diffusion 1.5 template)

  • Negative embedding for XL (unaestheticXL_bp5) as well as the already present EasyNegative for SD1.5

  • Added some settings at startup to further optimize it

  • Added both Clip-Skip and VAE to the Stable Diffusion Homepage UI

  • ADetailer is automatically active

  • Image creation resolution, CFG, Steps, Sampler and Scheduler set automatically


indrema light 3.0 - 25/07/24

All In One

  • Added CyberRealistic-Negative Embedding for SD1.5

  • Changed the default negative embedding from EasyNegative to CyberRealistic-Negative (To try to fix some problem to some users. EasyNegative is still inside and usable)

  • Removed --No-half-vae from start (To try to fix some problem to some users)

  • Added Style.csv with all my prompts

  • One file RAR for all (LowVRam, MedVRam or Maximum Speed)


Indrema Light 4.0 - 26-07-2024

All in One

  • Added FastNegative V2 and bad-image-v2-39000 Embedding for SD1.5

  • Added zPDXL and zPDXL-neg Embedding for SDXL

  • Compiled RunMe.bat, now you have all this options when it start:

    • 1) Low-VRam - Slow Speed - Works on 3GB

    • 2) Med-VRam - Decent Speed - COULD work on 3GB

    • 3) High-VRam - Full Speed - PROBABLY NOT working with 3GB, but it requires at least 6GB

    • 4) Low-VRam - NansException - (Like Option 1, but it avoids this kind of error)

    • 5) Med-VRam - NansException - (Like Option 2, but it avoids this kind of error)

    • 6) High-VRam - NansException - (Like Option 3, but it avoids this kind of error)

    • 7) EXIT


HOW TO USE IT



TROUBLESHOOTING


NansException ERROR

  • Solution:

    Go inside indrema light folder -> webui.

    Click with the RIGHT BUTTON of the mouse over the file webui-user.bat and choose to "edit" (with notepad).
    Search for this line:

    set COMMANDLINE_ARGS= --xformers --skip-torch-cuda-test --ad-no-huggingface --disable-safe-unpickle
    and at the end add: --no-half --no-half-vae --disable-nan-check

  • The complete line should look like this:

    set COMMANDLINE_ARGS= --xformers --skip-torch-cuda-test --ad-no-huggingface --disable-safe-unpickle --no-half --no-half-vae --disable-nan-check


    Save, Close, Launch the file: run.bat
    Done.


PS: no XL models are included in V1. If you need one, and if you think that this version A1111 is helpful to you, please consider to download my AniVerse XL to thank me


>>>ITALIAN VERSION<<<


Ecco una versione di A1111 standalone e portable (per cui non serve installazione e si può spostare da PC a PC.

Questa versione permette di utilizzare Stable Diffusion XL con una scheda grafica dotata solo di 3GB di VRam (nVidia)

Si ringrazia nuaion per avermi mandato la configurazione e i file relativi.


NOTE DI RILASCIO:


indrema light 1.0 - 18/07/24

- Prima uscita


indrema light 2.0 - 24/07/24

Aggiunto:

  • ADetailer (con i modelli già inclusi e senza bisogno di download)

  • VAE sia per SD1.5 che per XL (ottimizzato, nessun errore NaN)

  • Modello per SD 1.5 AniThing V3.0 Pruned (quindi durante l'avvio non scaricherà il modello standard Stable Diffusion 1.5)

  • Negative Embedding per XL (unaestheticXL_bp5) oltre al già presente EasyNegative per SD1.5

  • Aggiunte alcune impostazioni all'avvio per ottimizzarlo ulteriormente

  • Aggiunti sia Clip-Skip che VAE all'interfaccia utente della home page di Stable Diffusion

  • ADetailer è automaticamente attivo

  • Risoluzione di creazione immagine, CFG, passaggi, campionatore e pianificazione impostati automaticamente


indrema light 3.0 - 25/07/24

All in One

  • Aggiunto il negative embedding CyberRealistic-Negative per SD 1.5

  • Modificato il Negative Embedding predefinito da EasyNegative a CyberRealistic-Negative (per provare a risolvere alcuni problemi per alcuni utenti. EasyNegative è ancora all'interno e utilizzabile)

  • Rimosso --No-half-vae dall'avvio (per provare a risolvere qualche problema per alcuni utenti)

  • Aggiunto Style.csv con tutti i miei prompt

  • Un file RAR per tutti (LowVRam, MedVRam o Velocità massima)


Indrema Light 4.0 - 26-07-2024

All in One

  • Aggiunto FastNegative V2 e bad-image-v2-39000 Embedding for SD1.5

  • Aggiunto zPDXL and zPDXL-neg Embedding for SDXL

  • Creato RunMe.bat, ora quando parte vi chiederà di scegliere un'opzione:

    • 1) Low-VRam - Slow Speed - Works on 3GB

    • 2) Med-VRam - Decent Speed - COULD work on 3GB

    • 3) High-VRam - Full Speed - PROBABLY NOT working with 3GB, but it requires at least 6GB

    • 4) Low-VRam - NansException - (Like Option 1, but it avoids this kind of error)

    • 5) Med-VRam - NansException - (Like Option 2, but it avoids this kind of error)

    • 6) High-VRam - NansException - (Like Option 3, but it avoids this kind of error)

    • 7) EXIT


COME SI USA



TROUBLESHOOTING


NansException ERROR

  • Soluzione:

    Vai dentro la cartella indrema light folder -> webui.

    Clicca con il TASTO DESTRO del mouse sopra al file webui-user.bat e seleziona "Modifica" (con notepad o notepad++)
    Trova questa linea:

    set COMMANDLINE_ARGS= --xformers --skip-torch-cuda-test --ad-no-huggingface --disable-safe-unpickle
    alla fine aggiungi: --no-half --no-half-vae --disable-nan-check

  • La riga completa dovrebbe comparirti così:

    set COMMANDLINE_ARGS= --xformers --skip-torch-cuda-test --ad-no-huggingface --disable-safe-unpickle --no-half --no-half-vae --disable-nan-check


    Salva, Chiudi, e lancia il file: run.bat
    Fatto.


PS: Nessun modello XL è incluso nel pacchetto V1. Se te ne serve uno e, ritieni che questa versione di A1111 ti sia stata utile, considera la possibilità di utilizzare il mio modello AniVerse XL per ringraziarmi.

53

Comments

Grazie, quasi quasi provo anche questo. Vediamo come và.

Samael1976's Avatar

Aspetta domani. Nuaion lo sta ottimizzando e sostituisco i file con quello nuovo. Ti scrivo un commento quando è online ;)

Ok grazie ;)

Samael1976's Avatar

ok, ora è ottimizzato, fammi sapere se va ;)

Ci sto provando ma non mi carica la pagina, quello vecchio lo scaricava (puoi usare MEGA?) : Impossibile raggiungere questa pagina

silveri**********.it ha richiesto troppo tempo per rispondere

aeronliru's Avatar

Good! I have own SD fork with Sd/XL/Pony etc, but it works on my 6Gb RAM GTX 1660Ti. Will test your version! Thanks for your work!

Samael1976's Avatar

Let me know if it work good ;)

Samael1976's Avatar

New optimized version :)

Samael1976's Avatar

added v2 and mirror to mega for the download

aeronliru's Avatar

for me not working... this erro when I'm tyryin to generate ANY picture

RuntimeError: expected scalar type Half but found Float

Samael1976's Avatar

If my first solution to delete --no-half-vae is not working, try to change it in --no-half

Samael1976's Avatar

I found the solution:

FOR THOSE WHO WERE HAVING THE PROBLEM "RuntimeError: expected scalar type Half but found Float"

This problem showed up when I used "easynegative" embeddings, but I could use it normally when not including them.

aeronliru's Avatar

no any em,beddings at all. unpacked you package and click RUN.bat. your default model that inside package. no any files were added inside.

aeronliru's Avatar

RuntimeError: expected scalar type Half but found Float

on last version

Samael1976's Avatar

try the v4 version ;)

aeronliru's Avatar

I'm out of experimenting.

I made own engine based on Stable Diffusion Forge sources. a little reconfigured tio fit my needs, and added couple additional modules etc.

working now without xformers, cuz they didn;t supported by new torch versions, but with my moddings it does SD with 1200x700 @1.8-2sec/step on GTX 1660Ti Laptop 6Gb GDDR6, and SDXL with @3.3sec/step - for me it's enough.

Show more
Samael1976's Avatar

I totally understand ;)

nvmnd's Avatar

I was doing some XL generations with the standard A1111, but generation times take forever, is the performance improved with this optimized version?

Samael1976's Avatar

just try and tell me. You can install without any problem, because is a standalone and it don't touch your installed version

Samael1976's Avatar

New optimized version

Samael1976's Avatar

added v2 and mirror to mega for the download

Samael1976's Avatar

Ok, Guys&Girls, added V2, with some optimization and ADetailer, embedding ect ect already included

aeronliru's Avatar

RuntimeError: expected scalar type Half but found Float

on last version

Samael1976's Avatar

Ok, thank you. Can you do that for me, and tell me if it works?

- Go into the Indrema Light folder

- Enter the folder with the name: webui

- At the bottom, you will find a file called: webui-user.bat

- Click on it with the right mouse button, and click on "Edit" (use notepad or notepad++)

- Delete the value: --no-half-vae

- Save the file

- Close the file

- Go back to the main Indrema_light folder and start Stable Diffusion by clicking RUN

Show more
LUNA_s13's Avatar

My problem

NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

when I added no half, there was problem in loading the pony model.

version I installed : Indrema Light V2 Full Speed.rar - (Mirror V2 - Full Speed)

Show more
Samael1976's Avatar

Added V3.0 - For add --no-half, it's very easy. Go inside indrema light folder -> webui. Click with the right button of the mouse over the file webui-user.bat and choose to edit (with notepad).
Search for this line: set COMMANDLINE_ARGS= --xformers --skip-torch-cuda-test --ad-no-huggingface --disable-safe-unpickle
and at the end add: --no-half --no-half-vae --disable-nan-check
Save, Close, Launch the file: run.bat
Done.

Show more
LUNA_s13's Avatar

I did it before. And when I added no half, there was a problem in loading the pony model. I will write the error for you

Samael1976's Avatar

Thank you (PS version 4 is online)

LUNA_s13's Avatar

OK now👌👍❤🙏

Samael1976's Avatar

Added v3.0 All in One

Samael1976's Avatar

Added v4.0 with 7 start options

aeronliru's Avatar

Let me give you some advices:

- delete any SD/SDXL models from your engine. It's not so good to download everytime 5-6gb o data, especially when most of ppl have OWN models list. and to download the same model every time it's not good

- make support for external folder of models OUT OF BOX - for ppl it will be better to edit one line in run bat to re-link models folder outside of engine, not moving everytime models inside your engine

- add adetailer. Never OOM, HyperTile, ControlNet, open optpapint, openpose, and some most advanced upscalers scripts out-of-box of your engine

- and yes, make UI english only. it's most understandanble language in the world

thx!

Show more
Samael1976's Avatar

Thank you for your advice!
- There is the model inside, because if I delete all and I leave the folder empty, A1111 start to download SD.15 standard model automatically. So you will lose the time to download a model that you'll never use.
- The support about external folder is very easy, you can specify a models folder by adding --ckpt-dir to COMMANDLINE_ARGS= in webiu-user.bat that you use. (example: --ckpt-dir E:\\name-folder-of-stable-diffusion-checkpoints. You can do also for Lora and Embedding: -lora-dir and --embeddings-dir. Here you'll find all variable that you can customize: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
- ADetailer is already inside and active and it not download any model becuase there are already inside.
- HyperTile, ControlNet, open optpapint, openpose, and some most advanced upscalers scripts out-of-box of your engine are for "advace user". I think that if someone wants, can install them.
- The UI is in English or I wrong something?

Show more
aeronliru's Avatar

- users can simply stop BAT running and replace temp file with existing model(s), anyway there will be no any actions after downloading model

- I know how to make anyth in SD A1111 or SD Forge, but if you will make it out-of-box it will be more helpful for users.

- you can put modules that I meant and pre-configured them by default out-of-box, this will help ppl get faster gen speed and better picture quality (with hypertile and freeU+never oom) , also you can pre-configure and enable adetailer by deafult put-of box and hires fix

- looking for your bAT screenshot it's not all in English...

Show more
Samael1976's Avatar

- Not everyone knows how to do it

- I could do it, but I think he would ask you too many questions before launching A1111 (and he would do it all the time, not just the first time)

- Adding extensions upon extensions can cause more startup problems. Which is why I prefer to leave the essentials. Then if you want you can install what you want.

- ADetailer and Hires.Fix (Kohya hires.fix is ​​a better alternative than the classic hires.fix) are already active and pre-configured

- You're right, I forgot to translate those two phases into Italian... as soon as I have a moment of time I'll do it

Show more
aeronliru's Avatar

- how they can't knoow if they installing SD engine and generating images? it's not a simple app to "install and generate" it's more complicate!

this needs only close CMD window and that's all. then move models into models folder.

- it wouldn't ask many questions, just installing all needed modules by itself, pre-configusing means pre-conf in config and ui-config.json by setting values. users will get already pre-configured engine without additional manual configuring from their side.

- Kohya i snot better then native hires, if you know how to setup native hires.

Show more
vihangasa14's Avatar

I have tested this one in rtx 6GB 3050 Vram and its working well better than standard one

dilectiogames's Avatar

do you have any article explaining what you did to configure this?

Samael1976's Avatar

is all written in this article... just read the releases notes...

Samael1976's Avatar

ps if you mean how I did, no sorry, there is 't any article.

Great job, thanks! The only thing I would like to note is that there is not enough ControlNet "out of the box" - sometimes a person wants to work with it (as long as the video card allows, of course).

Santiagosfx's Avatar

What are the approximate generation times on 4-6gb cards?

Samael1976's Avatar

it depends by various factor. For, i can suggest you to use DPM ++ 2M for a faster generation. To me, with a 2060 (but I've 12gb) at the resolution of 1344x768, with 35 steps is around 25/30 second. If you add adetailer, add 20 seconds more

ronaldmikhailp236's Avatar

Getting closer to running SDXL on our Android phones. Great work on this project.

Samael1976's Avatar

Thank you!!!

is it possible to load/use pony models/loras from this install?

Samael1976's Avatar

yes, pony is a XL model and no problem with Loras