You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would generate the legendary "banana sushi" with Seed 42, k_lms Sampler and 10 steps.
124
+
This would generate the legendary "banana sushi" with Seed 42, k_lms Sampler and 10 steps.
121
125
122
126
Find out more about available CLI-Parameters at [features/CLI.md](../../features/CLI/#arguments)
123
127
124
128
---
125
129
130
+
## Running InvokeAI in the cloud with Docker
131
+
132
+
We offer an optimized Ubuntu-based image that has been well-tested in cloud deployments. Note: it also works well locally on Linux x86_64 systems with an Nvidia GPU. It *may* also work on Windows under WSL2 and on Intel Mac (not tested).
133
+
134
+
An advantage of this method is that it does not need any local setup or additional dependencies.
135
+
136
+
See the `docker-build/Dockerfile.cloud` file to familizarize yourself with the image's content.
137
+
138
+
### Prerequisites
139
+
140
+
- a `docker` runtime
141
+
-`make` (optional but helps for convenience)
142
+
- Huggingface token to download models, or an existing InvokeAI runtime directory from a previous installation
143
+
144
+
Neither local Python nor any dependencies are required. If you don't have `make` (part of `build-essentials` on Ubuntu), or do not wish to install it, the commands from the `docker-build/Makefile` are readily adaptable to be executed directly.
145
+
146
+
### Building and running the image locally
147
+
148
+
1. Clone this repo and `cd docker-build`
149
+
1.`make build` - this will build the image. (This does *not* require a GPU-capable system).
150
+
1._(skip this step if you already have a complete InvokeAI runtime directory)_
151
+
-`make configure` (This does *not* require a GPU-capable system)
152
+
- this will create a local cache of models and configs (a.k.a the _runtime dir_)
153
+
- enter your Huggingface token when prompted
154
+
1.`make web`
155
+
1. Open the `http://localhost:9090` URL in your browser, and enjoy the banana sushi!
156
+
157
+
To use InvokeAI on the cli, run `make cli`. To open a Bash shell in the container for arbitraty advanced use, `make shell`.
158
+
159
+
#### Building and running without `make`
160
+
161
+
(Feel free to adapt paths such as `${HOME}/invokeai` to your liking, and modify the CLI arguments as necessary).
162
+
163
+
!!! example "Build the image and configure the runtime directory"
This image works anywhere you can run a container with a mounted Docker volume. You may either build this image on a cloud instance, or build and push it to your Docker registry. To manually run this on a cloud instance (such as AWS EC2, GCP or Azure VM):
187
+
188
+
1. build this image either in the cloud (you'll need to pull the repo), or locally
189
+
1.`docker tag` it as `your-registry/invokeai` and push to your registry (i.e. Dockerhub)
190
+
1.`docker pull` it on your cloud instance
191
+
1. configure the runtime directory as per above example, using `docker run ... configure_invokeai.py` script
192
+
1. use either one of the `docker run` commands above, substituting the image name for your own image.
193
+
194
+
To run this on Runpod, please refer to the following Runpod template: https://www.runpod.io/console/gpu-secure-cloud?template=vm19ukkycf (you need a Runpod subscription). When launching the template, feel free to set the image to pull your own build.
195
+
196
+
The template's `README` provides ample detail, but at a high level, the process is as follows:
197
+
198
+
1. create a pod using this Docker image
199
+
1. ensure the pod has an `INVOKEAI_ROOT=<path_to_your_persistent_volume>` environment variable, and that it corresponds to the path to your pod's persistent volume mount
200
+
1. Run the pod with `sleep infinity` as the Docker command
201
+
1. Use Runpod basic SSH to connect to the pod, and run `python scripts/configure_invokeai.py` script
202
+
1. Stop the pod, and change the Docker command to `python scripts/invoke.py --web --host 0.0.0.0`
203
+
1. Run the pod again, connect to your pod on HTTP port 9090, and enjoy the banana sushi!
204
+
205
+
Running on other cloud providers such as Vast.ai will likely work in a similar fashion.
206
+
207
+
---
208
+
126
209
!!! warning "Deprecated"
127
210
128
211
From here on you will find the the previous Docker-Docs, which will still
@@ -135,12 +218,12 @@ also do so.
135
218
If you're on a **Linux container** the `invoke` script is **automatically
136
219
started** and the output dir set to the Docker volume you created earlier.
137
220
138
-
If you're **directly on macOS follow these startup instructions**.
221
+
If you're **directly on macOS follow these startup instructions**.
139
222
With the Conda environment activated (`conda activate ldm`), run the interactive
140
223
interface that combines the functionality of the original scripts `txt2img` and
141
-
`img2img`:
224
+
`img2img`:
142
225
Use the more accurate but VRAM-intensive full precision math because
143
-
half-precision requires autocast and won't work.
226
+
half-precision requires autocast and won't work.
144
227
By default the images are saved in `outputs/img-samples/`.
145
228
146
229
```Shell
@@ -157,8 +240,8 @@ invoke> q
157
240
### Text to Image
158
241
159
242
For quick (but bad) image results test with 5 steps (default 50) and 1 sample
160
-
image. This will let you know that everything is set up correctly.
161
-
Then increase steps to 100 or more for good (but slower) results.
243
+
image. This will let you know that everything is set up correctly.
244
+
Then increase steps to 100 or more for good (but slower) results.
162
245
The prompt can be in quotes or not.
163
246
164
247
```Shell
@@ -172,8 +255,8 @@ You'll need to experiment to see if face restoration is making it better or
172
255
worse for your specific prompt.
173
256
174
257
If you're on a container the output is set to the Docker volume. You can copy it
175
-
wherever you want.
176
-
You can download it from the Docker Desktop app, Volumes, my-vol, data.
258
+
wherever you want.
259
+
You can download it from the Docker Desktop app, Volumes, my-vol, data.
177
260
Or you can copy it from your Mac terminal. Keep in mind `docker cp` can't expand
178
261
`*.png` so you'll need to specify the image file name.
0 commit comments