doomiaichat 4.2.0 → 4.3.0

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.
@@ -22,6 +22,7 @@ export interface StabilityOption {
22
22
  'height'?: number;
23
23
  'width'?: number;
24
24
  'samples'?: number;
25
+ 'seed'?: number;
25
26
  'steps'?: number;
26
27
  'sampler'?: string;
27
28
  'negative'?: string;
@@ -26,7 +26,6 @@ class StabilityPlusAI extends stabilityai_1.default {
26
26
  headers: {
27
27
  "Content-Type": "application/json",
28
28
  "Accept": "application/json",
29
- // "Authorization": `Bearer ${this.apiKey}`
30
29
  }
31
30
  });
32
31
  try {
@@ -42,7 +41,7 @@ class StabilityPlusAI extends stabilityai_1.default {
42
41
  "hr_resize_y": 0,
43
42
  "prompt": chatText,
44
43
  "styles": [this.apiSetting.engine || "bra_v5"],
45
- "seed": -1,
44
+ "seed": paramOption.seed || this.apiOption.seed || -1,
46
45
  "subseed": -1,
47
46
  "subseed_strength": 0,
48
47
  "seed_resize_from_h": -1,
@@ -50,7 +49,7 @@ class StabilityPlusAI extends stabilityai_1.default {
50
49
  "sampler_name": paramOption.sampler || this.apiOption.sampler || "Euler",
51
50
  "batch_size": 1,
52
51
  "n_iter": paramOption.samples || this.apiOption.samples || 1,
53
- "steps": 50,
52
+ "steps": paramOption.steps || this.apiOption.steps || 50,
54
53
  "cfg_scale": paramOption.cfg_scale || this.apiOption.cfg_scale || 7,
55
54
  "width": paramOption.width || this.apiOption.width || 512,
56
55
  "height": paramOption.height || this.apiOption.height || 512,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doomiaichat",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "Doomisoft OpenAI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -72,6 +72,7 @@ export interface StabilityOption {
72
72
  'height'?: number,
73
73
  'width'?: number,
74
74
  'samples'?: number,
75
+ 'seed'?:number,
75
76
  'steps'?: number,
76
77
  'sampler'?:string,
77
78
  'negative'?:string
@@ -11,7 +11,6 @@ export default class StabilityPlusAI extends StabilityAI {
11
11
  headers: {
12
12
  "Content-Type": "application/json",
13
13
  "Accept": "application/json",
14
- // "Authorization": `Bearer ${this.apiKey}`
15
14
  }
16
15
  })
17
16
  try {
@@ -31,7 +30,7 @@ export default class StabilityPlusAI extends StabilityAI {
31
30
  "hr_resize_y": 0,
32
31
  "prompt": chatText,
33
32
  "styles": [this.apiSetting.engine || "bra_v5"], //["bra_v5"], //模型
34
- "seed": -1,
33
+ "seed": paramOption.seed || this.apiOption.seed || -1,
35
34
  "subseed": -1,
36
35
  "subseed_strength": 0,
37
36
  "seed_resize_from_h": -1,
@@ -39,7 +38,7 @@ export default class StabilityPlusAI extends StabilityAI {
39
38
  "sampler_name": paramOption.sampler || this.apiOption.sampler || "Euler", //"Euler",
40
39
  "batch_size": 1,
41
40
  "n_iter": paramOption.samples || this.apiOption.samples || 1, //生成的数量
42
- "steps": 50,
41
+ "steps": paramOption.steps || this.apiOption.steps || 50,
43
42
  "cfg_scale": paramOption.cfg_scale || this.apiOption.cfg_scale || 7,
44
43
  "width": paramOption.width || this.apiOption.width || 512,
45
44
  "height": paramOption.height || this.apiOption.height || 512,