mirror of
				https://github.com/AbdBarho/stable-diffusion-webui-docker.git
				synced 2025-10-29 17:24:25 -04:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | eef83a318c | ||
|  | bc8ec0fe55 | ||
|  | f5e9997a55 | 
							
								
								
									
										22
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| { | ||||
|   // Use IntelliSense to learn about possible attributes. | ||||
|   // Hover to view descriptions of existing attributes. | ||||
|   // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||||
|   "version": "0.2.0", | ||||
|   "configurations": [ | ||||
|     { | ||||
|       "name": "WebUI", | ||||
|       "type": "python", | ||||
|       "request": "launch", | ||||
|       "program": "${file}", | ||||
|       "cwd": "/stable-diffusion", | ||||
|       "args": ["--ckpt", "${workspaceFolder}/models/model.ckpt", "--gfpgan-dir", "${workspaceFolder}/models/", "--extra-models-cpu"], | ||||
|       "env": { | ||||
|         "TRANSFORMERS_CACHE":"${workspaceFolder}/cache/transformers", | ||||
|         "TORCH_HOME":"${workspaceFolder}/cache/torch" | ||||
|       }, | ||||
|       "console": "integratedTerminal", | ||||
|       "justMyCode": false | ||||
|     } | ||||
|   ] | ||||
| } | ||||
							
								
								
									
										22
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								README.md
									
									
									
									
									
								
							| @@ -18,19 +18,14 @@ you can let it build in the background while you download the different models | ||||
| - (Optional) [GFPGANv1.3.pth (333MB)](https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth) to improve generated faces. | ||||
| - (Optional) [RealESRGAN_x4plus.pth (64MB)](https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth) and [RealESRGAN_x4plus_anime_6B.pth (18MB)](https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth) for super-sampling. | ||||
|  | ||||
| Put all of the downloaded models in the `models` folder, the folder structure should look something like this: | ||||
| Put all of the downloaded files in the `models` folder, it should look something like this: | ||||
|  | ||||
| ``` | ||||
| ├── README.md | ||||
| ├── docker-compose.yml | ||||
| ├── build | ||||
| ├── cache | ||||
| ├── models | ||||
| │   ├── GFPGANv1.3.pth | ||||
| │   ├── RealESRGAN_x4plus.pth | ||||
| │   ├── RealESRGAN_x4plus_anime_6B.pth | ||||
| │   └── model.ckpt | ||||
| ├── output | ||||
| models/ | ||||
| ├── GFPGANv1.3.pth | ||||
| ├── RealESRGAN_x4plus.pth | ||||
| ├── RealESRGAN_x4plus_anime_6B.pth | ||||
| └── model.ckpt | ||||
| ``` | ||||
|  | ||||
| ## Run | ||||
| @@ -47,7 +42,10 @@ Note: the first start will take sometime as some other models will be downloaded | ||||
|  | ||||
| ## Config | ||||
|  | ||||
| in the `docker-compose.yml` you can change the `CLI_ARGS` variable contains all of the variables that will be passed to [the web ui](https://github.com/hlky/stable-diffusion-webui/blob/e253a27a0fd5f252e9acb9b0003f7e3570ab7162/webui.py), by default: `--extra-models-cpu --optimized-turbo` are given, which allow you to use this model on a 6GB GPU. | ||||
| in the `docker-compose.yml` you can change the `CLI_ARGS` variable contains all of the variables that will be passed to [the web ui](https://github.com/hlky/stable-diffusion-webui/blob/49e6178fd82ca736f9bbc621c6b12487c300e493/webui.py). | ||||
|  | ||||
| By default: `--gfpgan-gpu 0 --esrgan-cpu --optimized-turbo` are given, which allow you to use this model on a 6GB GPU. | ||||
| NOTE: GFPGAN does not work on the CPU [More info here](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/4) | ||||
|  | ||||
| # Disclaimer | ||||
|  | ||||
|   | ||||
| @@ -13,7 +13,7 @@ RUN apt-get update && apt install fonts-dejavu-core && apt-get clean | ||||
|  | ||||
| # Note: don't update the sha of previous versions because the install will take forever | ||||
| # instead, update the repo state in a later step | ||||
| RUN cd stable-diffusion && git pull && git reset --hard 64490d2df8b321d6562d3023210a30a2c5ad42b7 && \ | ||||
| RUN cd stable-diffusion && git pull && git reset --hard c0c2a7c0d55561cfb6f42a3681346b9b70749ff1 && \ | ||||
|   conda env update --file environment.yaml --name base && conda clean -a -y | ||||
|  | ||||
| # download dev UI version, update the sha below in case you want some other version | ||||
| @@ -21,7 +21,7 @@ RUN <<EOF | ||||
| git clone https://github.com/hlky/stable-diffusion-webui.git | ||||
| cd stable-diffusion-webui | ||||
| # map to this file: https://github.com/hlky/stable-diffusion-webui/blob/master/.github/sync.yml | ||||
| git reset --hard e253a27a0fd5f252e9acb9b0003f7e3570ab7162 | ||||
| git reset --hard 49e6178fd82ca736f9bbc621c6b12487c300e493 | ||||
| cp -t /stable-diffusion/scripts/ webui.py relauncher.py txt2img.yaml | ||||
| cp -t /stable-diffusion/configs/webui webui.yaml | ||||
| cp -t /stable-diffusion/frontend/ frontend/* | ||||
|   | ||||
| @@ -11,7 +11,7 @@ services: | ||||
|       - ./output:/output | ||||
|       - ./models:/models | ||||
|     environment: | ||||
|       - CLI_ARGS=--extra-models-cpu --optimized-turbo | ||||
|       - CLI_ARGS=--gfpgan-gpu 0 --esrgan-cpu --optimized-turbo | ||||
|     deploy: | ||||
|       resources: | ||||
|         reservations: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user