Explorar o código

Move GFPGAN to GPU

Abdullah Barhoum %!s(int64=4) %!d(string=hai) anos
pai
achega
eef83a318c
Modificáronse 3 ficheiros con 27 adicións e 2 borrados
  1. 22 0
      .vscode/launch.json
  2. 4 1
      README.md
  3. 1 1
      docker-compose.yml

+ 22 - 0
.vscode/launch.json

@@ -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
+    }
+  ]
+}

+ 4 - 1
README.md

@@ -42,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/49e6178fd82ca736f9bbc621c6b12487c300e493/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
 

+ 1 - 1
docker-compose.yml

@@ -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: