@runware/sdk-js 1.1.18 → 1.1.19

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 CHANGED
@@ -71,7 +71,7 @@ type IControlNetGeneral = {
71
71
  };
72
72
  type IControlNetPreprocess = {
73
73
  inputImage: string | File;
74
- preProcessor: EPreProcessorGroup;
74
+ preProcessorType: EPreProcessorGroup;
75
75
  height?: number;
76
76
  width?: number;
77
77
  outputType?: IOutputType;
@@ -281,7 +281,7 @@ declare class RunwareBase {
281
281
  private listenToImages;
282
282
  private globalListener;
283
283
  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>;
284
- controlNetPreProcess: ({ inputImage, preProcessor, height, width, outputType, outputFormat, highThresholdCanny, lowThresholdCanny, includeHandsAndFaceOpenPose, includeCost, customTaskUUID, retry, }: IControlNetPreprocess) => Promise<IControlNetImage | null>;
284
+ controlNetPreProcess: ({ inputImage, preProcessorType, height, width, outputType, outputFormat, highThresholdCanny, lowThresholdCanny, includeHandsAndFaceOpenPose, includeCost, customTaskUUID, retry, }: IControlNetPreprocess) => Promise<IControlNetImage | null>;
285
285
  requestImageToText: ({ inputImage, includeCost, customTaskUUID, retry, }: IRequestImageToText) => Promise<IImageToText>;
286
286
  removeImageBackground: ({ inputImage, outputType, outputFormat, rgba, postProcessMask, returnOnlyMask, alphaMatting, alphaMattingForegroundThreshold, alphaMattingBackgroundThreshold, alphaMattingErodeSize, includeCost, customTaskUUID, retry, }: IRemoveImageBackground) => Promise<IRemoveImage>;
287
287
  upscaleGan: ({ inputImage, upscaleFactor, outputType, outputFormat, includeCost, customTaskUUID, retry, }: IUpscaleGan) => Promise<IImage>;
package/dist/index.d.ts CHANGED
@@ -71,7 +71,7 @@ type IControlNetGeneral = {
71
71
  };
72
72
  type IControlNetPreprocess = {
73
73
  inputImage: string | File;
74
- preProcessor: EPreProcessorGroup;
74
+ preProcessorType: EPreProcessorGroup;
75
75
  height?: number;
76
76
  width?: number;
77
77
  outputType?: IOutputType;
@@ -281,7 +281,7 @@ declare class RunwareBase {
281
281
  private listenToImages;
282
282
  private globalListener;
283
283
  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>;
284
- controlNetPreProcess: ({ inputImage, preProcessor, height, width, outputType, outputFormat, highThresholdCanny, lowThresholdCanny, includeHandsAndFaceOpenPose, includeCost, customTaskUUID, retry, }: IControlNetPreprocess) => Promise<IControlNetImage | null>;
284
+ controlNetPreProcess: ({ inputImage, preProcessorType, height, width, outputType, outputFormat, highThresholdCanny, lowThresholdCanny, includeHandsAndFaceOpenPose, includeCost, customTaskUUID, retry, }: IControlNetPreprocess) => Promise<IControlNetImage | null>;
285
285
  requestImageToText: ({ inputImage, includeCost, customTaskUUID, retry, }: IRequestImageToText) => Promise<IImageToText>;
286
286
  removeImageBackground: ({ inputImage, outputType, outputFormat, rgba, postProcessMask, returnOnlyMask, alphaMatting, alphaMattingForegroundThreshold, alphaMattingBackgroundThreshold, alphaMattingErodeSize, includeCost, customTaskUUID, retry, }: IRemoveImageBackground) => Promise<IRemoveImage>;
287
287
  upscaleGan: ({ inputImage, upscaleFactor, outputType, outputFormat, includeCost, customTaskUUID, retry, }: IUpscaleGan) => Promise<IImage>;
package/dist/index.js CHANGED
@@ -494,7 +494,7 @@ var RunwareBase = class {
494
494
  };
495
495
  this.controlNetPreProcess = async ({
496
496
  inputImage,
497
- preProcessor,
497
+ preProcessorType,
498
498
  height,
499
499
  width,
500
500
  outputType,
@@ -520,7 +520,7 @@ var RunwareBase = class {
520
520
  inputImage: image.imageUUID,
521
521
  taskType: "imageControlNetPreProcess" /* IMAGE_CONTROL_NET_PRE_PROCESS */,
522
522
  taskUUID,
523
- preProcessor
523
+ preProcessorType
524
524
  }, evaluateNonTrue({ key: "height", value: height })), evaluateNonTrue({ key: "width", value: width })), evaluateNonTrue({ key: "outputType", value: outputType })), evaluateNonTrue({ key: "outputFormat", value: outputFormat })), evaluateNonTrue({ key: "includeCost", value: includeCost })), evaluateNonTrue({
525
525
  key: "highThresholdCanny",
526
526
  value: highThresholdCanny
package/dist/index.mjs CHANGED
@@ -472,7 +472,7 @@ var RunwareBase = class {
472
472
  };
473
473
  this.controlNetPreProcess = async ({
474
474
  inputImage,
475
- preProcessor,
475
+ preProcessorType,
476
476
  height,
477
477
  width,
478
478
  outputType,
@@ -498,7 +498,7 @@ var RunwareBase = class {
498
498
  inputImage: image.imageUUID,
499
499
  taskType: "imageControlNetPreProcess" /* IMAGE_CONTROL_NET_PRE_PROCESS */,
500
500
  taskUUID,
501
- preProcessor
501
+ preProcessorType
502
502
  }, evaluateNonTrue({ key: "height", value: height })), evaluateNonTrue({ key: "width", value: width })), evaluateNonTrue({ key: "outputType", value: outputType })), evaluateNonTrue({ key: "outputFormat", value: outputFormat })), evaluateNonTrue({ key: "includeCost", value: includeCost })), evaluateNonTrue({
503
503
  key: "highThresholdCanny",
504
504
  value: highThresholdCanny
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runware/sdk-js",
3
- "version": "1.1.18",
3
+ "version": "1.1.19",
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
@@ -231,7 +231,7 @@ return interface IImageToText {
231
231
 
232
232
  const runware = new Runware({ apiKey: "API_KEY" });
233
233
  const image = await runware.removeImageBackground({
234
- imageInitiator: string | File
234
+ inputImage: string | File
235
235
  outputType?: IOutputType;
236
236
  outputFormat?: IOutputFormat;
237
237
  rgba?: number[];
@@ -346,7 +346,7 @@ return interface IEnhancedPrompt {
346
346
  const runware = new Runware({ apiKey: "API_KEY" });
347
347
  const controlNetPreProcessed = await runware.controlNetPreProcess({
348
348
  inputImage: string | File;
349
- preProcessor: EPreProcessor;
349
+ preProcessorType: EPreProcessor;
350
350
  height?: number;
351
351
  width?: number;
352
352
  outputType?: IOutputType;
@@ -392,6 +392,13 @@ return interface IControlNetImage {
392
392
 
393
393
  ## Changelog
394
394
 
395
+ ### - v1.1.19
396
+
397
+ **Added or Changed**
398
+
399
+ - Fix Preprocessor type bug for controlnet
400
+ - Update readme
401
+
395
402
  ### - v1.1.18
396
403
 
397
404
  **Added or Changed**