@runware/sdk-js 1.1.36 → 1.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -12
- package/dist/index.d.ts +24 -12
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +46 -30
package/readme.md
CHANGED
|
@@ -100,6 +100,7 @@ const images = await runware.requestImages({
|
|
|
100
100
|
retry?: number;
|
|
101
101
|
ipAdapters?: IipAdapters[];
|
|
102
102
|
embeddings?: IEmbedding[];
|
|
103
|
+
outpaint: IOutpaint;
|
|
103
104
|
onPartialImages?: (images: IImage[], error: IError) => void;
|
|
104
105
|
})
|
|
105
106
|
|
|
@@ -147,7 +148,14 @@ const [firstImagesRequest, secondImagesRequest] = await Promise.all([
|
|
|
147
148
|
embeddings: [{
|
|
148
149
|
model: string;
|
|
149
150
|
weight: number;
|
|
150
|
-
}]
|
|
151
|
+
}],
|
|
152
|
+
outpaint: {
|
|
153
|
+
top: 256,
|
|
154
|
+
right: 128,
|
|
155
|
+
bottom: 256,
|
|
156
|
+
left: 128,
|
|
157
|
+
blur: 16
|
|
158
|
+
}
|
|
151
159
|
onPartialImages?: (images: IImage[], error: IError) => void;
|
|
152
160
|
})
|
|
153
161
|
])
|
|
@@ -169,35 +177,36 @@ return interface ITextToImage {
|
|
|
169
177
|
}[]
|
|
170
178
|
```
|
|
171
179
|
|
|
172
|
-
| Parameter | Type | Use
|
|
173
|
-
| ------------------ | ------------------------------------- |
|
|
174
|
-
| positivePrompt | string | Defines the positive prompt description of the image.
|
|
175
|
-
| negativePrompt | string | Defines the negative prompt description of the image.
|
|
176
|
-
| width | number | Controls the image width.
|
|
177
|
-
| height | number | Controls the image height.
|
|
178
|
-
| model | string | The AIR system ID of the image to be requested.
|
|
179
|
-
| numberResults | number: `(Optional)` (default = 1) | `(Optional)` The number of images to be generated.
|
|
180
|
-
| outputType | IOutputType: `(Optional)` | Specifies the output type in which the image is returned.
|
|
181
|
-
| outputFormat | IOutputFormat: `(Optional)` | Specifies the format of the output image.
|
|
182
|
-
| uploadEndpoint | string: `(Optional)` | This parameter allows you to specify a URL to which the generated image will be uploaded as binary image data using the HTTP PUT method. For example, an S3 bucket URL can be used as the upload endpoint.
|
|
183
|
-
| checkNSFW | boolean: `(Optional)` | This parameter is used to enable or disable the NSFW check. When enabled, the API will check if the image contains NSFW (not safe for work) content. This check is done using a pre-trained model that detects adult content in images.
|
|
184
|
-
| seedImage | string or File: `(Optional)` | When doing Image-to-Image, Inpainting or Outpainting, this parameter is required.Specifies the seed image to be used for the diffusion process.
|
|
185
|
-
| maskImage | string or File: `(Optional)` | The image to be used as the mask image. It can be the UUID of previously generated image, or an image from a file.
|
|
186
|
-
| strength | number: `(Optional)` | When doing Image-to-Image, Inpainting or Outpainting, this parameter is used to determine the influence of the seedImage image in the generated output. A higher value results in more influence from the original image, while a lower value allows more creative deviation.
|
|
187
|
-
| steps | number: `(Optional)` | The number of steps is the number of iterations the model will perform to generate the image. The higher the number of steps, the more detailed the image will be.
|
|
188
|
-
| scheduler | string: `(Optional)` | An scheduler is a component that manages the inference process. Different schedulers can be used to achieve different results like more detailed images, faster inference, or more accurate results.
|
|
189
|
-
| seed | number: `(Optional)` | A seed is a value used to randomize the image generation. If you want to make images reproducible (generate the same image multiple times), you can use the same seed value.
|
|
190
|
-
| CFGScale | number: `(Optional)` | Guidance scale represents how closely the images will resemble the prompt or how much freedom the AI model has. Higher values are closer to the prompt. Low values may reduce the quality of the results.
|
|
191
|
-
| clipSkip | number: `(Optional)` | CLIP Skip is a feature that enables skipping layers of the CLIP embedding process, leading to quicker and more varied image generation.
|
|
192
|
-
| usePromptWeighting | boolean: `(Optional)` | Allow setting different weights per words or expressions in prompts.
|
|
193
|
-
| clipSkip | number: `(Optional)` | CLIP Skip is a feature that enables skipping layers of the CLIP embedding process, leading to quicker and more varied image generation.
|
|
194
|
-
| lora | ILora[]: `(Optional)` | With LoRA (Low-Rank Adaptation), you can adapt a model to specific styles or features by emphasizing particular aspects of the data.
|
|
195
|
-
| embeddings | IEmbedding[]: `(Optional)` | Embeddings (or Textual Inversion) can be used to add specific concepts or styles to your generations. Multiple embeddings can be used at the same time.
|
|
196
|
-
| ipAdapters | IipAdapter[]: `(Optional)` | IP-Adapters enable image-prompted generation, allowing you to use reference images to guide the style and content of your generations. Multiple IP Adapters can be used simultaneously.
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
180
|
+
| Parameter | Type | Use |
|
|
181
|
+
| ------------------ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
182
|
+
| positivePrompt | string | Defines the positive prompt description of the image. |
|
|
183
|
+
| negativePrompt | string | Defines the negative prompt description of the image. |
|
|
184
|
+
| width | number | Controls the image width. |
|
|
185
|
+
| height | number | Controls the image height. |
|
|
186
|
+
| model | string | The AIR system ID of the image to be requested. |
|
|
187
|
+
| numberResults | number: `(Optional)` (default = 1) | `(Optional)` The number of images to be generated. |
|
|
188
|
+
| outputType | IOutputType: `(Optional)` | Specifies the output type in which the image is returned. |
|
|
189
|
+
| outputFormat | IOutputFormat: `(Optional)` | Specifies the format of the output image. |
|
|
190
|
+
| uploadEndpoint | string: `(Optional)` | This parameter allows you to specify a URL to which the generated image will be uploaded as binary image data using the HTTP PUT method. For example, an S3 bucket URL can be used as the upload endpoint. |
|
|
191
|
+
| checkNSFW | boolean: `(Optional)` | This parameter is used to enable or disable the NSFW check. When enabled, the API will check if the image contains NSFW (not safe for work) content. This check is done using a pre-trained model that detects adult content in images. |
|
|
192
|
+
| seedImage | string or File: `(Optional)` | When doing Image-to-Image, Inpainting or Outpainting, this parameter is required.Specifies the seed image to be used for the diffusion process. |
|
|
193
|
+
| maskImage | string or File: `(Optional)` | The image to be used as the mask image. It can be the UUID of previously generated image, or an image from a file. |
|
|
194
|
+
| strength | number: `(Optional)` | When doing Image-to-Image, Inpainting or Outpainting, this parameter is used to determine the influence of the seedImage image in the generated output. A higher value results in more influence from the original image, while a lower value allows more creative deviation. |
|
|
195
|
+
| steps | number: `(Optional)` | The number of steps is the number of iterations the model will perform to generate the image. The higher the number of steps, the more detailed the image will be. |
|
|
196
|
+
| scheduler | string: `(Optional)` | An scheduler is a component that manages the inference process. Different schedulers can be used to achieve different results like more detailed images, faster inference, or more accurate results. |
|
|
197
|
+
| seed | number: `(Optional)` | A seed is a value used to randomize the image generation. If you want to make images reproducible (generate the same image multiple times), you can use the same seed value. |
|
|
198
|
+
| CFGScale | number: `(Optional)` | Guidance scale represents how closely the images will resemble the prompt or how much freedom the AI model has. Higher values are closer to the prompt. Low values may reduce the quality of the results. |
|
|
199
|
+
| clipSkip | number: `(Optional)` | CLIP Skip is a feature that enables skipping layers of the CLIP embedding process, leading to quicker and more varied image generation. |
|
|
200
|
+
| usePromptWeighting | boolean: `(Optional)` | Allow setting different weights per words or expressions in prompts. |
|
|
201
|
+
| clipSkip | number: `(Optional)` | CLIP Skip is a feature that enables skipping layers of the CLIP embedding process, leading to quicker and more varied image generation. |
|
|
202
|
+
| lora | ILora[]: `(Optional)` | With LoRA (Low-Rank Adaptation), you can adapt a model to specific styles or features by emphasizing particular aspects of the data. |
|
|
203
|
+
| embeddings | IEmbedding[]: `(Optional)` | Embeddings (or Textual Inversion) can be used to add specific concepts or styles to your generations. Multiple embeddings can be used at the same time. |
|
|
204
|
+
| ipAdapters | IipAdapter[]: `(Optional)` | IP-Adapters enable image-prompted generation, allowing you to use reference images to guide the style and content of your generations. Multiple IP Adapters can be used simultaneously. |
|
|
205
|
+
| outpaint | IOutpaint[]: `(Optional)` | Extends the image boundaries in specified directions. When using outpainting, you must provide the final dimensions using width and height parameters, which should account for the original image size plus the total extension (seedImage dimensions + top + bottom, left + right). |
|
|
206
|
+
| controlNet | IControlNet[]: `(Optional)` | With ControlNet, you can provide a guide image to help the model generate images that align with the desired structure. |
|
|
207
|
+
| onPartialImages | function: `(Optional)` | If you want to receive the images as they are generated instead of waiting for the async request, you get the images as they are generated from this function. |
|
|
208
|
+
| includeCost | boolean `(Optional)` | If set to true, the cost to perform the task will be included in the response object. |
|
|
209
|
+
| retry | number `(default = globalMaxRetries)` | The number of retries it should make before throwing an error. |
|
|
201
210
|
|
|
202
211
|
##### ControlNet Params
|
|
203
212
|
|
|
@@ -657,6 +666,13 @@ export type TImageMaskingResponse = {
|
|
|
657
666
|
|
|
658
667
|
## Changelog
|
|
659
668
|
|
|
669
|
+
### - v1.1.37
|
|
670
|
+
|
|
671
|
+
**Added or Changed**
|
|
672
|
+
|
|
673
|
+
- Add outpainint
|
|
674
|
+
- Extend photomaker payloads
|
|
675
|
+
|
|
660
676
|
### - v1.1.36
|
|
661
677
|
|
|
662
678
|
**Added or Changed**
|