Skip to content

Commit b53f2e6

Browse files
committed
feat: improve pipeline
- add types - update documents
1 parent 0bb70c6 commit b53f2e6

File tree

5 files changed

+237
-123
lines changed

5 files changed

+237
-123
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,27 @@ const { images, parameters } = await new Pipeline(client)
9494

9595
> For details about extensions, refer to the **Processor Usage** section.
9696
97+
### img2img (or inpainting) with pipeline
98+
```ts
99+
const input_image = fs.readFileSync("./input_image.jpg").toString("base64");
100+
const input_mask = fs.readFileSync("./input_mask.jpg").toString("base64");
101+
const { images, parameters } = await new Pipeline(client)
102+
.model("sdxl.safetensors")
103+
.prompt("A beautiful sunset over the mountains")
104+
.negative("Low quality, blurry")
105+
.sampler("DPM++ 2M")
106+
.scheduler("exponential")
107+
.size(1024, 768)
108+
.steps(35)
109+
.cfg(5)
110+
.images(input_image)
111+
// 👇 inpainting params 👇
112+
// .inpainting(InpaintFill.original)
113+
// .mask(input_mask)
114+
.use(/* extension */)
115+
.run();
116+
```
117+
97118
## API Usage
98119

99120
### Documentation

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stable-canvas/sd-webui-a1111-client",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "API client for AUTOMATIC1111/stable-diffusion-webui for Node.js and Browser.",
55
"source": "src/main.ts",
66
"main": "dist/main.umd.js",

pnpm-lock.yaml

Lines changed: 45 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)