Skip to content

Commit

Permalink
doc: update README and flux.md
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <[email protected]>
  • Loading branch information
apepkuss committed Sep 20, 2024
1 parent b8e3856 commit 6431b02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This project is a RESTful API server that provides image generation and editing
wasmedge --dir .:. sd-api-server.wasm --model-name sd-v1.4 --model stable-diffusion-v1-4-Q8_0.gguf
```

> `sd-api-server` will use `8080` port by default. You can change the port by adding `--socket-addr <ip-address>:<port>`.
> `sd-api-server` will use `8080` port by default. You can change the port by adding `--port <port>`.
### Usage

Expand Down Expand Up @@ -95,7 +95,7 @@ This project is a RESTful API server that provides image generation and editing
- Send a request for image editing

```bash
curl --location 'http://localhost:10086/v1/images/edits' \
curl --location 'http://localhost:8080/v1/images/edits' \
--form 'image=@"otter.png"' \
--form 'prompt="A cute baby sea otter with blue eyes"'
```
Expand Down Expand Up @@ -170,6 +170,8 @@ Options:
Number of threads to use during computation. Default is -1, which means to use all available threads [default: -1]
--socket-addr <SOCKET_ADDR>
Socket address of LlamaEdge API Server instance [default: 0.0.0.0:8080]
--port <PORT>
Socket address of LlamaEdge API Server instance [default: 8080]
-h, --help
Print help
-V, --version
Expand Down
10 changes: 5 additions & 5 deletions examples/flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ This example demonstrates how to use the `sd-api-server` to generate images usin
- Install WasmEdge v0.14.1

```bash
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- -v 0.14.1-rc.5
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- -v 0.14.1
```

If the installation is successful, WasmEdge will be installed in `$HOME/.wasmedge`.

- Deply `wasmedge_stablediffusion` plugin

> For the purpose of demonstration, we will use the stable diffusion plugin for Mac Apple Silicon. You can find the plugin for other platforms [Releases/0.14.1-rc.5](https://github.com/WasmEdge/WasmEdge/releases/tag/0.14.1-rc.5)
> For the purpose of demonstration, we will use the stable diffusion plugin for Mac Apple Silicon. You can find the plugin for other platforms [Releases/0.14.1](https://github.com/WasmEdge/WasmEdge/releases/tag/0.14.1)
```bash
# Download stable diffusion plugin for Mac Apple Silicon
curl -LO https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1-rc.5/WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-rc.5-darwin_arm64.tar.gz
curl -LO https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1/WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-darwin_arm64.tar.gz

# Unzip the plugin to $HOME/.wasmedge/plugin
tar -xzf WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-rc.5-darwin_arm64.tar.gz -C $HOME/.wasmedge/plugin
tar -xzf WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-darwin_arm64.tar.gz -C $HOME/.wasmedge/plugin
```

## Run sd-api-server
Expand Down Expand Up @@ -59,7 +59,7 @@ This example demonstrates how to use the `sd-api-server` to generate images usin
--t5xxl t5xxl-Q2_K.gguf
```

> `sd-api-server` will use `8080` port by default. You can change the port by adding `--socket-addr <ip-address>:<port>`.
> `sd-api-server` will use `8080` port by default. You can change the port by adding `--port <port>`.
## Usage

Expand Down

0 comments on commit 6431b02

Please sign in to comment.