AI
March 2024 - Stable Diffusion with AMD on windows -- use zluda ;)
SD is so much better now using Zluda! Here is how to run automatic1111 with zluda on windows, and get all the features you were missing before! ** Only GPU's that are fully supported or partially supported with ROCm can run this, check if yours is fully or partially supported before starting! ** check if your gpu is fully supported on windows here: https://rocm.docs.amd.com/projects/install-on-windows/en/develop/reference/system-requirements.html Links to files and things: Git for windows: https://gitforwindows.org/ Python: https://www.python.org/downloads/ Zluda: https://github.com/lshqqytiger/ZLUDA/releases/ AMD HIP SDK: https://rocm.docs.amd.com/projects/install-on-windows/en/develop/ Add PATH for HIP SDK and wherever you copies Zluda files to %HIP_PATH%bin C:\path\to\zluda\folder Start Automatic 1111 webui webui.bat copy zluda cublas and cusparse to ...\stable-diffusion-webui-directml\venv\Lib\site-packages\torch\lib delete cublas64_11 and cusparse64_11 rename zluda files cublas.dll to cublas64_11.dll cusparse to cusparse64_11.dll back in terminal run webui webui.bat --use-zluda If you have issues with cudnn ...\stable-diffusion-webui-directml\modules\shared_init.py Add this after def initialize torch.backends.cudnn.enabled = False If you have a GPU that is not fully supported in hip SDK follow these instructions https://github.com/vladmandic/automatic/wiki/ZLUDA
Watch Video on YoutubePublished on: 3/5/2024
AMD GPU + Windows + ComfyUI! How to get comfyUI running on windows with an AMD GPU!
Happy Holidays! ComfyUI in windows and running on an AMD GPU! Install Git https://gitforwindows.org/ Install miniconda for windows (remember to add to path!) https://docs.conda.io/projects/miniconda/en/latest/ Complete steps coming after the holidays calm down a bit, for now you will have to actually watch the whole 6 minutes of video! ;-p
Watch Video on YoutubePublished on: 12/24/2023
Run the newest LLM's locally! No GPU needed, no configuration, fast and stable LLM's!
This is crazy, it can run LLM's without needing a gpu at all, and it runs it fast enough that it is usable! Setup your own AI chatbots, AI coder, AI medical bot, AI creative writer, and more! Install on Linux or Windows Subsystem for Linux 2 curl https://ollama.ai/install.sh | sh Install on Mac: https://ollama.ai/download/mac Pull and run a model ollama run [modelname] Pull and run a 13b model ollama run [modelname]:13b Exit out from running ollama /bye Ollama website: https://ollama.ai/ Ollama Github https://github.com/jmorganca/ollama Start Ollama if it is not running sudo systemctl start ollama Stop Ollama if you wanted to for some reason sudo systemctl stop ollama Stop ollama from booting up on system boot sudo systemctl disable ollama
Watch Video on YoutubePublished on: 12/9/2023
Install Stable Diffusion on windows in one click! AMD GPU's fully supported!
Want to run Stable diffusion on windows with an AMD gpu? Install and run Shark from Nod.ai in one click. Simplest way to get stable diffusion up and running even on AMD. Page to download installer: https://github.com/nod-ai/shark/releases/tag/20231009.984 Direct link to installer: https://github.com/nod-ai/SHARK/releases/download/20231009.984/nodai_shark_studio_20231009_984.exe
Watch Video on YoutubePublished on: 12/4/2023
Training SD Models with AMD GPU's in DreamBooth! Surprisingly fast results!
Training your own custom Stable Diffusion models in dreambooth with AMD GPU's is awesome! Add pictures of people you know and train the AI to put them into pictures. Bring patterns and textures into a model. Train SD to draw a character more reliably by using real photos and telling SD who that character is to produce reliable results! Endless possibilities! Install Dreambooth extension in Automatic1111 Change diffusers to 0.23.1 go to stable-dffusion-webui/extensions/sd_dreambooth_extension edit file requirements.txt find line with diffusers and change to ==0.23.1 save file In command line source venv/bin/activate pip install -r /extensions/sd_dreambooth_extension/requirements.txt After that you should be able to start SD like normal Dreambooth tab create a model once created ensure that model is selected go to concepts put in directory of training images put in the prompt you want to be associated with those images sample images tab put in a prompt to generate images after training is done -- include the new prompt you just made parameters tab 8bit adam uses bits and bytes, only viable if you have bits and bytes compiled correctly with ROCm or are using Nvidia cards AMD use Torch AdamW uncheck use ema uncheck cache latents Mixed precision bf16 Check Full Mixed Precision Intervals Save Model Frequency bump up to only saving a few times during training Save Previews Frequency drop to 0 Image Generation Tab Native Diffusers EulerAncestralDiscrete has worked for me Image Processing - if you have vram issues drop down scale to 256 Save config before training! Hit train and see how it goes, you can train a model more, but if you over train a model you will need to start over.
Watch Video on YoutubePublished on: 12/2/2023
The BEST SDXL Model for realism right now! Just updated 25 November!
This model is insane! Images in video were not cherry picked, I would change the style from stylez tab, generate one image, then change stylez again. I ran through roughly 60 styles one image per style, these were the results! Gorgeous results from dead simple prompts. Better prompts will likely yield better results, but even with simple prompts it creates far better results than any other model I have seen so far. Link to Model: https://civitai.com/models/140737/albedobase-xl Just go there and click download now while you watch so that it is ready when you are done watching! I do not know the person who created it, but it is incredibly well done, if you are in a position to do so then supporting them and their work would be incredibly kind. They have links for donations etc on their civitai page! Dark Angel Prompt: a beautiful (female armored (dark:1.3) angel:1.4) with blood red hair, (halo:1.6) overhead, (sunset:1.6), (god rays:1.3), (prominent deep shadows:1.7), (lens flare:1.1) Steps: 150 Sampler used: Euler A Original Image Size: 1280 x 768 Upscaled in Extras Tab Upscaler Settings: Scale by: 1.5x Upscaler: ESRGAN 2x secondary upscaler: none Codeformer: Visibility: .75 Weight: .75
Watch Video on YoutubePublished on: 11/25/2023
How to convert civitai models to ONNX! AMD GPU's on windows can use tons of SD models!
I had numerous folks from comments asking how to convert models from civitai. I went and looked at several different ways of doing this, and spent days fighting through broken programs, bad code, worse documentation, only to find out, the Olive tab already worked just fine. For anyone who has no idea what is going on, this is using Automatic1111 fork for DirectML on windows 11. See how to install Automatic1111 form for directML here: https://youtu.be/Db0HuRY2p84 In the Olive tab, optimize from the Optimize Checkpoint tab don't click on optimize onnx model tab at all copy the name of your entire file and paste it in at checkpoint name copy the filename without an extension for onnx model folder name output folder name hit optimize. After a while it should get optimized. If it complains about no config.json file for safety checker, sorry I have not been able to get those to work (looking at you SD 2-1). Also while most seem to work fine, I did find some that constantly created "grainy, washed out, faded" looking images. I have not found any way to make those models work properly on ONNX yet, I suspect it is a side effect of the ONNX conversion. Hope this helps! Happy holidays to everyone!
Watch Video on YoutubePublished on: 11/25/2023
Install and run LLM's Locally with text generation webui on AMD gpu's!
Let's setup and run large language models similar to ChatGPT locally on our AMD gpu's! ### Installing ROCm sudo apt update sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev sudo apt update wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb sudo apt install ./amdgpu-install_5.7.50701-1_all.deb sudo amdgpu-install --usecase=graphics,rocm sudo usermod -aG video $USER sudo usermod -aG render $USER sudo reboot ### Installing Text Generation Webui mkdir ~/gpt cd gpt/ git clone https://github.com/oobabooga/text-generation-webui cd text-generation-webui # Setup virtual env python3 -m venv venv source venv/bin/activate # Install correct torch ROCm5.6 pip3 install torch --index-url https://download.pytorch.org/whl/rocm5.6 # Install the rest of dependencies pip3 install -r requirements_amd.txt # Installing with no avx support pip3 install -r requirements_amd_noavx2.txt # Create launch script sudo nano launch.sh # Inside launch script paste: #!/bin/bash source venv/bin/activate export HIP_VISIBLE_DEVICES=0 export HSA_OVERRIDE_GFX_VERSION=11.0.0 python3 ./server.py --listen ### save and exit your launch script # Make script executable sudo chmod +x launch.sh # Now you can launch webui with your script ./launch.sh Model from the video: TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ Some settings to check if models are not loading: Disable exllama float 32 fp4 Transformers works most of the time, not always performant though. Generally load_in_8bit and load_in_4bit will not work -- it uses bitsandbytes which has bad ROCm support.
Watch Video on YoutubePublished on: 11/22/2023
ControlNet is amazing! Install it on Automatic1111 now!
ControlNet is absolutely incredible. Easily one of the best tools to use with stable diffusion! ControlNet Install from Git: https://github.com/Mikubill/sd-webui-controlnet.git Page to download ControlNet models: https://huggingface.co/lllyasviel/ControlNet-v1-1/tree/main If you have installed controlnet and do not see it running, try stopping the server entirely and restart it.
Watch Video on YoutubePublished on: 11/19/2023
Create 500+ step images, hacking Automatic1111 UI changing min/max settings!
If you ever wanted to be able to change the default min/max settings in Automatic1111, this is how you do it. Go to Automatic1111 file folder. Make a backup copy of ui-config.json file Store backup copy somewhere outside of Automatic1111 directory Back in Automatic1111 folder, edit ui-config.json file Change values however you want, for instance change txt2img/sampling-steps/maximum from 150 to 500. Save file reload UI Now you can create 500 step images!
Watch Video on YoutubePublished on: 11/18/2023
1 SECOND Stable Diffusion images! SD + LORA's are FAST!
Lora's let you generate high quality images in far fewer steps. Download the correct LORA for your model (sdxl, sd1.5, ssd 1b) Place Lora in correct folder, and rename file so you know which one it is Turn on Lora network to match your model Take steps down to 5 - 15 Turn CFG down to 1 - 2.5 Change sampler to one that works well - Euler a, Euler Click Generate! Download LORA's here: https://huggingface.co/latent-consistency Other ones to try? https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7 Have fun everyone!
Watch Video on YoutubePublished on: 11/18/2023
Installing hundreds of preset styles in Automatic1111! Creating your own styles!
Generating art in a particular style can be difficult and time consuming from prompting. So using a mix of pre-defined styles, and creating some custom styles that can be re-used can greatly speed up your ability to generate art that has a look and feel and style that you are after. Two tools for styling in SD: Style Selector XL: https://github.com/ahgsql/StyleSelectorXL Stylez: https://github.com/javsezlol1/stylez Install - check for updates - reload UI
Watch Video on YoutubePublished on: 11/14/2023
AMD ROCm in linux with Automatic1111 running stable diffusion! Simple guide to getting started!
This is the one. The simplest way to get ROCm running Automatic1111 Stable diffusion with all features on AMD gpu's! Inside terminal: sudo apt update sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev sudo apt update wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb sudo apt install ./amdgpu-install_5.7.50701-1_all.deb sudo amdgpu-install --usecase=graphics,rocm sudo usermod -aG video $USER sudo usermod -aG render $USER sudo reboot After you have rebooted, inside terminal again make a directory for stable diffusion mkdir sd If you get a permission denied then use sudo mkdir sd Skip this step if you did not have to use sudo change owner to be yourself sudo chown -R $USER:$USER sd/ change into new directory cd sd clone automatic1111 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui cd stable-diffusion-webui setup python venv python3 -m venv venv source venv/bin/activate install packages pip3 install -r requirements.txt uninstall cuda torch pip3 uninstall torch torchvision install torch ROCm pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6 create launch script: sudo nano launch.sh inside the launch file paste the contents of this url: https://github.com/jhodak/linux-configuration-files/blob/main/SD/launch-sh to launch SD bash launch.sh optional parameters for your launch script: --no-half --precision full --upcast-sampling --no-half-vae --medvram If you don't need these extra parameters I would recommend not to turn them on. You may only need one or two of these parameters. If you do not have an 11.0.0 graphics card, you may need to try: HSA_OVERRIDE_GFX_VERSION=10.3.0 If you have an AMD integrated GPU, and you are having troubles, you may need to change: HIP_VISIBLE_DEVICES=1 If you are having some memory troubles try changing garbage collection threshold in launch script to 0.9
Watch Video on YoutubePublished on: 11/12/2023
Let's make a dual-boot PC! Windows + Ubuntu 22.04 Desktop!
This goes over creating a dual-boot PC that will let you boot into both Windows or Ubuntu Desktop. **If you are formatting drives, ensure that you choose the correct drive to install Ubuntu Desktop onto!** Requirements: Empty USB stick larger than 6Gb Ubuntu desktop 22.04 iso image Rufus.exe file Recommended: A drive entirely dedicated to linux, 1Tb or larger ideally. Ubuntu Downloads: https://ubuntu.com/download/desktop Rufus Tool for creating a bootable USB drive: https://rufus.ie/downloads/
Watch Video on YoutubePublished on: 11/12/2023
Automatically activate conda and run your SD from one bat file! Super easy!
Several viewers actually asked for help with this, so I figured I would make a very quick video. This will activate your conda environment that you use for stable diffusion. It will change into the correct directory. Then it will simply run the start command with any arguments to launch stable diffusion. When you are done with running stable diffusion, just hit control + C to close it out. run-sd.bat call conda activate sd_olive cd stable-diffusion-webui-directml/ webui.bat --onnx --backend directml Be sure to change the conda activate to the name of your conda environment. make sure that cd changes into the correct directory. add or remove any command line arguments if you normally need to run them. The file contents can also be found here: https://github.com/jhodak/linux-configuration-files/blob/main/SD/autorun-conda
Watch Video on YoutubePublished on: 11/9/2023
Beginners guide using automatic1111 and stable diffusion with AMD gpus! Tips , tricks, and gotchas!
This is a simple beginner's tutorial for using Stable Diffusion with amd graphics cards running Automatic1111. We will learn how to use stable diffusion, and learn which things work, and which things do not work appropriately so that you can enjoy creating images and don't spend hours trying to get broken features to work. Commands from in the video: conda info --envs conda activate [environment name] webui.bat --onnx --backend directml If you want to put command line arguments into your webui.bat file use this: set COMMANDLINE_ARGS=--onnx --backend directml common command line arguments --lowram --lowvram --medvram --opt-sub-quad-attention Full set of command line arguments: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
Watch Video on YoutubePublished on: 11/5/2023
AMD GPU's are screaming fast at stable diffusion! How to install Automatic1111 on windows with AMD
*Update March 2024 -- better way to do this* https://youtu.be/n8RhNoAenvM *Alternatives for windows* Shark - https://youtu.be/4mcdTwFUxMQ?si=COmlj9A1NQgNuZK0 ComfyUI - https://youtu.be/8rB7RqKvU5U?si=pKMK2ss5-FSuo-f- Getting Stable diffusion running on AMD GPU's used to be pretty complicated. It is so much easier now, and you can get amazing performance out of your AMD GPU! Download latest AMD drivers! Follow this guide: https://community.amd.com/t5/ai/updated-how-to-running-optimized-automatic1111-stable-diffusion/ba-p/630252 Install Git for windows Install MiniConda for windows (add directory to path!) Open mini conda command prompt conda create --name Automatic1111_olive python=3.10.6 conda activate Automatic1111_olive git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml cd stable-diffusion-webui-directml git submodule update --init --recursive webui.bat --onnx --backend directml If you get an error about "socket_options" venv\Scripts\activate pip install httpx==0.24.1 Great models to use: prompthero/openjourney Lykon/DreamShaper If looking for models on hugging face... they need to have text-to-img libraries: check onnx Download model from ONNX tab Then go to Olive tab, inside Olive use the Optimize ONNX model when optimizing ONNX model ID is the same as you used to download change input and output folder names to be the same as the location the model downloaded to. Optimization takes a while! Come back and I will have some other videos about tips and tricks for getting good results!
Watch Video on YoutubePublished on: 11/4/2023