Skip to content

Commit

Permalink
document some new variables and endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 16, 2023
1 parent 2ceffe4 commit f043c0a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 40 deletions.
26 changes: 14 additions & 12 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,27 @@ Introspection endpoint.

#### `GET /api/settings/filters`

TODO
List available mask and source filters.

#### `GET /api/settings/masks`

Available mask filters.
List available mask filters.

#### `GET /api/settings/models`

Available models, all types.
List available models, all types.

#### `GET /api/settings/noises`

Available noise sources.
List available noise sources.

#### `GET /api/settings/params`

Server parameters, slider min/max and version check.

#### `GET /api/settings/pipelines`

TODO
List available pipelines.

#### `GET /api/settings/platforms`

Expand All @@ -91,11 +91,11 @@ Available pipeline schedulers.

#### `GET /api/settings/strings`

TODO
Server strings, from extras file and plugins.

#### `GET /api/settings/wildcards`

TODO
List available wildcard paths.

### Pipelines

Expand All @@ -105,11 +105,11 @@ Check if a pipeline has completed.

#### `POST /api/blend`

TODO
Blend two images using a mask.

#### `POST /api/chain`

TODO
Run a [custom chain pipeline](./chain-pipelines.md).

#### `POST /api/img2img`

Expand All @@ -125,15 +125,17 @@ Run a txt2img pipeline.

#### `POST /api/txt2txt`

TODO
**Unstable.**

Run a txt2txt pipeline.

#### `POST /api/upscale`

TODO
Run an upscale pipeline.

#### `PUT /api/cancel`

TODO
Cancel a pending or in-progress job.

### Outputs

Expand Down
34 changes: 17 additions & 17 deletions docs/chain-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,33 +94,33 @@ in [`common/pipelines`](../common/pipelines).

#### Blend: Denoise

TODO
Run [fast non-local means denoising](https://docs.opencv.org/4.8.0/d5/d69/tutorial_py_non_local_means.html) using `cv2`.

#### Blend: Grid

TODO
Combine the source images into a grid.

#### Blend: Img2img

TODO
Run an img2img pipeline.

#### Blend: Linear

TODO
Blend two images using linear interpolation (0.0 is the first image, 1.0 is the second).

#### Blend: Mask

TODO
Blend two images using a mask.

### Correction Stages

#### Correct: CodeFormer

TODO
Run correction using CodeFormer.

#### Correct: GFPGAN

TODO
Run correction using GFPGAN.

### Compound Stages

Expand All @@ -138,11 +138,11 @@ TODO

#### Persist: Disk

TODO
Save all of the sources to disk.

#### Persist: S3

TODO
Save all of the sources to an S3 bucket.

### Reduction Stages

Expand All @@ -158,29 +158,29 @@ TODO

#### Source: Noise

TODO
Create a new source using a noise generator.

#### Source: S3

TODO
Load a new source from an S3 bucket.

#### Source: Txt2img

TODO
Run a txt2img pipeline.

#### Source: URL

TODO
Load a new source from a URL.

### Upscaling Stages

#### Upscale: BSRGAN

TODO
Upscaling stage using BSRGAN.

#### Upscale: Highres

TODO
Upscaling stage using highres.

#### Upscale: Outpaint

Expand All @@ -195,7 +195,7 @@ Upscaling stage using the Real ESRGAN upscaling models, available in x2 and x4 v

#### Upscale: Simple

TODO
Upscaling stage using bilinear or Lanczos upscaling.

#### Upscale: Stable Diffusion

Expand All @@ -206,4 +206,4 @@ Upscaling stage using the Stable Diffusion x4 upscaling model:

#### Upscale: SwinIR

TODO
Upscaling stage using SwinIR.
31 changes: 20 additions & 11 deletions docs/server-admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,26 +206,32 @@ These extra images can be helpful when debugging inpainting, especially poorly b
#### Client Variables

- `ONNX_WEB_CIVITAI_ROOT`
- TODO
- root URL for downloading Civitai models
- rarely needs to be changed
- `ONNX_WEB_CIVITAI_TOKEN`
- TODO
- Civitai API token for models that require login
- you can create an API token in the Profile page: TODO LINK
- `ONNX_WEB_HUGGINGFACE_TOKEN`
- TODO
- Huggingface API token for models that require login

#### Conversion Variables

- `ONNX_WEB_CONVERT_CONTROL`
- TODO
- convert ControlNet
- disable to skip ControlNet, saving some disk and memory
- `ONNX_WEB_CONVERT_EXTRACT`
- TODO
- extract models to Torch directory before converting to ONNX
- disable to skip extraction, saving some disk
- extraction uses an older code path that does not work with some newer models and has a non-commercial license
- `ONNX_WEB_CONVERT_RELOAD`
- TODO
- `ONNX_WEB_CONVERT_SHARE_UNET`
- TODO
- `ONNX_WEB_CONVERT_OPSET`
- TODO
- `ONNX_WEB_CONVERT_CPU_ONLY`
- TODO
- perform conversion on the CPU, even if a CUDA GPU is available
- can allow conversion of models that do not fit in VRAM

#### Memory & Optimization Variables

Expand Down Expand Up @@ -268,20 +274,22 @@ These extra images can be helpful when debugging inpainting, especially poorly b
#### Server & Other Variables

- `ONNX_WEB_ADMIN_TOKEN`
- TODO
- token for admin operations
- required to update extras file and restart workers
- `ONNX_WEB_CORS_ORIGIN`
- comma-delimited list of allowed origins for CORS headers
- `ONNX_WEB_DEBUG`
- TODO
- wait for debugger to be attached before starting server
- `ONNX_WEB_EXTRA_ARGS`
- extra arguments to the launch script
- set this to `--half` to convert models to fp16
- `ONNX_WEB_FEATURE_FLAGS`
- TODO
- enable some [feature flags](#feature-flags)
- `ONNX_WEB_IMAGE_FORMAT`
- TODO
- `ONNX_WEB_JOB_LIMIT`
- TODO
- number of jobs to run before restarting workers
- can help prevent memory leaks
- `ONNX_WEB_PLUGINS`
- TODO
- `ONNX_WEB_SERVER_VERSION`
Expand All @@ -290,7 +298,8 @@ These extra images can be helpful when debugging inpainting, especially poorly b
- show progress bars in the logs
- disabling this can reduce noise in server logs, especially when logging to a file
- `ONNX_WEB_WORKER_RETRIES`
- TODO
- number of times to retry a tile or stage before failing the image
- more retries takes longer but can help prevent intermittent OOM errors from ruining long pipelines

### Feature Flags

Expand Down

0 comments on commit f043c0a

Please sign in to comment.