@runware/sdk-js 1.1.13 → 1.1.15
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
- package/readme.md +8 -2
package/dist/index.d.mts
CHANGED
|
@@ -271,8 +271,8 @@ declare class RunwareBase {
|
|
|
271
271
|
requestImages({ outputType, outputFormat, uploadEndpoint, checkNsfw, positivePrompt, negativePrompt, seedImage, maskImage, strength, height, width, model, steps, scheduler, seed, CFGScale, clipSkip, usePromptWeighting, numberResults, controlNet, lora, onPartialImages, includeCost, customTaskUUID, retry, }: IRequestImage): Promise<ITextToImage[] | undefined>;
|
|
272
272
|
controlNetPreProcess: ({ inputImage, preProcessor, height, width, outputType, outputFormat, highThresholdCanny, lowThresholdCanny, includeHandsAndFaceOpenPose, includeCost, customTaskUUID, }: IControlNetPreprocess) => Promise<IControlNetImage | null>;
|
|
273
273
|
requestImageToText: ({ inputImage, includeCost, customTaskUUID, }: IRequestImageToText) => Promise<IImageToText>;
|
|
274
|
-
removeImageBackground: ({ inputImage, outputType, outputFormat, rgba, postProcessMask, returnOnlyMask, alphaMatting, alphaMattingForegroundThreshold, alphaMattingBackgroundThreshold, alphaMattingErodeSize, includeCost, customTaskUUID, }: IRemoveImageBackground) => Promise<IRemoveImage
|
|
275
|
-
upscaleGan: ({ inputImage, upscaleFactor, outputType, outputFormat, includeCost, customTaskUUID, }: IUpscaleGan) => Promise<IImage
|
|
274
|
+
removeImageBackground: ({ inputImage, outputType, outputFormat, rgba, postProcessMask, returnOnlyMask, alphaMatting, alphaMattingForegroundThreshold, alphaMattingBackgroundThreshold, alphaMattingErodeSize, includeCost, customTaskUUID, }: IRemoveImageBackground) => Promise<IRemoveImage>;
|
|
275
|
+
upscaleGan: ({ inputImage, upscaleFactor, outputType, outputFormat, includeCost, customTaskUUID, }: IUpscaleGan) => Promise<IImage>;
|
|
276
276
|
enhancePrompt: ({ prompt, promptMaxLength, promptVersions, includeCost, customTaskUUID, }: IPromptEnhancer) => Promise<IEnhancedPrompt[]>;
|
|
277
277
|
ensureConnection(): Promise<unknown>;
|
|
278
278
|
private getSimilarImages;
|
package/dist/index.d.ts
CHANGED
|
@@ -271,8 +271,8 @@ declare class RunwareBase {
|
|
|
271
271
|
requestImages({ outputType, outputFormat, uploadEndpoint, checkNsfw, positivePrompt, negativePrompt, seedImage, maskImage, strength, height, width, model, steps, scheduler, seed, CFGScale, clipSkip, usePromptWeighting, numberResults, controlNet, lora, onPartialImages, includeCost, customTaskUUID, retry, }: IRequestImage): Promise<ITextToImage[] | undefined>;
|
|
272
272
|
controlNetPreProcess: ({ inputImage, preProcessor, height, width, outputType, outputFormat, highThresholdCanny, lowThresholdCanny, includeHandsAndFaceOpenPose, includeCost, customTaskUUID, }: IControlNetPreprocess) => Promise<IControlNetImage | null>;
|
|
273
273
|
requestImageToText: ({ inputImage, includeCost, customTaskUUID, }: IRequestImageToText) => Promise<IImageToText>;
|
|
274
|
-
removeImageBackground: ({ inputImage, outputType, outputFormat, rgba, postProcessMask, returnOnlyMask, alphaMatting, alphaMattingForegroundThreshold, alphaMattingBackgroundThreshold, alphaMattingErodeSize, includeCost, customTaskUUID, }: IRemoveImageBackground) => Promise<IRemoveImage
|
|
275
|
-
upscaleGan: ({ inputImage, upscaleFactor, outputType, outputFormat, includeCost, customTaskUUID, }: IUpscaleGan) => Promise<IImage
|
|
274
|
+
removeImageBackground: ({ inputImage, outputType, outputFormat, rgba, postProcessMask, returnOnlyMask, alphaMatting, alphaMattingForegroundThreshold, alphaMattingBackgroundThreshold, alphaMattingErodeSize, includeCost, customTaskUUID, }: IRemoveImageBackground) => Promise<IRemoveImage>;
|
|
275
|
+
upscaleGan: ({ inputImage, upscaleFactor, outputType, outputFormat, includeCost, customTaskUUID, }: IUpscaleGan) => Promise<IImage>;
|
|
276
276
|
enhancePrompt: ({ prompt, promptMaxLength, promptVersions, includeCost, customTaskUUID, }: IPromptEnhancer) => Promise<IEnhancedPrompt[]>;
|
|
277
277
|
ensureConnection(): Promise<unknown>;
|
|
278
278
|
private getSimilarImages;
|
package/dist/index.js
CHANGED
|
@@ -733,10 +733,11 @@ var RunwareBase = class {
|
|
|
733
733
|
};
|
|
734
734
|
this.getSingleMessage = ({ taskUUID }) => {
|
|
735
735
|
var _a;
|
|
736
|
-
const value =
|
|
737
|
-
|
|
736
|
+
const value = (_a = this._globalMessages[taskUUID]) == null ? void 0 : _a[0];
|
|
737
|
+
const errorValue = this._globalMessages[taskUUID];
|
|
738
|
+
if (!value && !errorValue)
|
|
738
739
|
return null;
|
|
739
|
-
return value;
|
|
740
|
+
return (errorValue == null ? void 0 : errorValue.error) ? errorValue : value;
|
|
740
741
|
};
|
|
741
742
|
this.disconnect = async () => {
|
|
742
743
|
var _a, _b, _c, _d;
|
package/dist/index.mjs
CHANGED
|
@@ -711,10 +711,11 @@ var RunwareBase = class {
|
|
|
711
711
|
};
|
|
712
712
|
this.getSingleMessage = ({ taskUUID }) => {
|
|
713
713
|
var _a;
|
|
714
|
-
const value =
|
|
715
|
-
|
|
714
|
+
const value = (_a = this._globalMessages[taskUUID]) == null ? void 0 : _a[0];
|
|
715
|
+
const errorValue = this._globalMessages[taskUUID];
|
|
716
|
+
if (!value && !errorValue)
|
|
716
717
|
return null;
|
|
717
|
-
return value;
|
|
718
|
+
return (errorValue == null ? void 0 : errorValue.error) ? errorValue : value;
|
|
718
719
|
};
|
|
719
720
|
this.disconnect = async () => {
|
|
720
721
|
var _a, _b, _c, _d;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runware/sdk-js",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "The SDK is used to run image inference with the Runware API, powered by the RunWare inference platform. It can be used to generate imaged with text-to-image and image-to-image. It also allows the use of an existing gallery of models or selecting any model or LoRA from the CivitAI gallery. The API also supports upscaling, background removal, inpainting and outpainting, and a series of other ControlNet models.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
package/readme.md
CHANGED
|
@@ -224,7 +224,7 @@ return interface IImage {
|
|
|
224
224
|
imageBase64Data?: string;
|
|
225
225
|
imageDataURI?: string;
|
|
226
226
|
cost: number;
|
|
227
|
-
}
|
|
227
|
+
}
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
| Parameter | Type | Use |
|
|
@@ -266,7 +266,7 @@ return interface IImage {
|
|
|
266
266
|
imageDataURI?: string;
|
|
267
267
|
NSFWContent?: boolean;
|
|
268
268
|
cost: number;
|
|
269
|
-
}
|
|
269
|
+
}
|
|
270
270
|
|
|
271
271
|
```
|
|
272
272
|
|
|
@@ -360,6 +360,12 @@ return interface IControlNetImage {
|
|
|
360
360
|
|
|
361
361
|
## Changelog
|
|
362
362
|
|
|
363
|
+
### - v1.1.14/v1.1.15
|
|
364
|
+
|
|
365
|
+
**Added or Changed**
|
|
366
|
+
|
|
367
|
+
- Fix incorrect response
|
|
368
|
+
|
|
363
369
|
### - v1.1.13
|
|
364
370
|
|
|
365
371
|
**Added or Changed**
|