User Tools

Site Tools


ai:stable-diffusion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ai:stable-diffusion [2024/04/27 15:23] – [Linux Docker install] Wulf Rajekai:stable-diffusion [2024/07/11 13:00] (current) Wulf Rajek
Line 48: Line 48:
  
   - Download and run installers for [[https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe|Python 3.10.6]] (ticking Add to PATH) and [[https://git-scm.com/download/win|git]]   - Download and run installers for [[https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe|Python 3.10.6]] (ticking Add to PATH) and [[https://git-scm.com/download/win|git]]
-  - Clone the fork as AMD is not officially supported\\ Paste into command prompt in a directory where it should live\\ <code>git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml && cd stable-diffusion-webui-directml && git submodule init && git submodule update+  - Clone the fork as AMD is not officially supported\\ Paste into command prompt in a directory where it should live\\ <code>git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml 
 +cd stable-diffusion-webui-directml 
 +git submodule init 
 +git submodule update 
 +venv\Scripts\python.exe -m pip install --upgrade pip 
 +venv\Scripts\pip.exe pip install -r requirements.txt 
 +venv\Scripts\pip.exe install torch-directml
 </code> </code>
-  - If you have only 4-6gb vram, try adding these flags to webui-user.bat like so:\\ <code>COMMANDLINE_ARGS=--opt-sub-quad-attention --lowvram --disable-nan-check</code> +  - Right-click webui-user.bat and adjust the command line args to\\ <code>COMMANDLINE_ARGS=--use-directml --skip-torch-cuda-test</code> 
-  - Double-click webui-user.bat in that directory+  - If you have only 4-6gb vram, try adding these additional flags to webui-user.bat's command line argslike so:\\ <code>--opt-sub-quad-attention --lowvram --disable-nan-check</code> 
 +  - Double-click webui-user.bat in that directory, this will download ~2.7GB torch and other python modules, followed by the 4GB Stable-Diffusion 1.5 pruned model.
   - If it looks like it is stuck when installing or running, press enter in the terminal and it should continue.   - If it looks like it is stuck when installing or running, press enter in the terminal and it should continue.
-  - point browser to [[http://localhost:7860/]]+  - once done, a browser opens to [[http://localhost:7860/]]
  
-Note: This is only GUIAI Models need to be downloaded to generate anything.+Check/Test if GPU is used in Task Manager's GPU tab. Dedicated GPU Memory should show large usage for the loaded Model and when generating test image in the web interface, the GPU usage should ramp up like here:\\ 
 +{{:ai:pasted:20240504-020430.png}} 
 + 
 +===== Performance ===== 
 + 
 +Approx times to generate 512x512 default settings images: 
 +^CPU/GPU^Model^Time^ 
 +|CPU|Intel 8th gen i5 (Intel NUC)|5-15 minutes| 
 +|GPU|AMD Radeon 780M|1.5 minutes| 
 +|GPU|AMD Radeon 7900XTX|21.7 seconds| 
 +|GPU|Nvidia RTX 4080|1.2 seconds| 
 + 
 +===== Gallery Addon ===== 
 + 
 +As an extension for SD-webui: 
 +Open the Extensions tab in SD-webui. 
 +  - Select the Install from URL option. 
 +  - Enter https://github.com/zanllp/sd-webui-infinite-image-browsing 
 +  - Click on the Install button. 
 +  - Wait for the installation to complete and click on Apply and restart UI.  
 + 
 +{{:ai:pasted:20240518-142918.png?500}} 
 + 
 +===== Cozy Nest UI Addon ===== 
 + 
 +As an extension for SD-webui: 
 +Open the Extensions tab in SD-webui. 
 +  - Select the Install from URL option. 
 +  - Enter https://github.com/Nevysha/Cozy-Nest 
 +  - Click on the Install button. 
 +  - Wait for the installation to complete and click on Apply and restart UI.  
 + 
 +{{:ai:pasted:20240518-142848.png?500}} 
 +===== general advice =====
  
 [[https://www.reddit.com/r/StableDiffusion/comments/x41n87/how_to_get_images_that_dont_suck_a/|Some general Stable Diffusion prompt advice]] [[https://www.reddit.com/r/StableDiffusion/comments/x41n87/how_to_get_images_that_dont_suck_a/|Some general Stable Diffusion prompt advice]]
  
 +[[https://machinelearningmastery.com/more-prompting-techniques-for-stable-diffusion/|More promptng techniques]]
 +
 +[[https://learnopencv.com/sdxl-inpainting/|Inpainting explanation]] 
  
 ====== Models / Settings ====== ====== Models / Settings ======
  
 +LoRA models/styles/tools as well as base models can be searched and downloaded from [[https://civitai.com/models|CivitAI]]
 ===== Realistic Vision + Lora ===== ===== Realistic Vision + Lora =====
  
Line 99: Line 143:
 download [[https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors|SDXL Turbo]] from https://huggingface.co/stabilityai/sdxl-turbo and copy into ''Models/Stable-diffusion'' directory. download [[https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors|SDXL Turbo]] from https://huggingface.co/stabilityai/sdxl-turbo and copy into ''Models/Stable-diffusion'' directory.
  
 +===== Text LoRA =====
  
-===== Test image prompts =====+https://civitai.com/models/176555?modelVersionId=214296  
 + 
 +Other Text LoRAs: 
 +https://civitai.com/tag/text 
 +===== Image Style/Prompt libraries ===== 
 + 
 +[[https://lexica.art/|Lexica]] 
 +[[https://prompthero.com/|PromptHero]] 
 + 
 +===== Some test image prompts =====
  
 <code> <code>
Line 130: Line 184:
 {{:ai:pasted:20240427-095226.png}} {{:ai:pasted:20240427-095226.png}}
  
 +====== Update docker ======
  
 +https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/683
  
 +If you want a more up to date version of A1111 here are the steps:
 +<code>
 +docker exec -it webui-docker-auto-1 /bin/bash
 +git pull
 +pip install -r requirements.txt
 +#if needed
 +cd repositories
 +git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git
 +exit
 +
 +docker stop webui-docker-auto-1
 +docker start webui-docker-auto-1
 +</code>
 +If it fails for any reason just rebuild the container using the standard process of docker compose --profile auto up --build
  
ai/stable-diffusion.1714227827.txt.gz · Last modified: 2024/04/27 15:23 by Wulf Rajek