doomiaichat 4.2.0 → 4.4.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.
- package/dist/stabilityai.d.ts +2 -0
- package/dist/stabilityplusai.js +3 -4
- package/package.json +1 -1
- package/src/stabilityai.ts +3 -1
- package/src/stabilityplusai.ts +3 -4
package/dist/stabilityai.d.ts
CHANGED
|
@@ -22,9 +22,11 @@ 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;
|
|
29
|
+
'engine'?: string;
|
|
28
30
|
}
|
|
29
31
|
export interface StabilityResult extends ApiResult {
|
|
30
32
|
'data'?: any;
|
package/dist/stabilityplusai.js
CHANGED
|
@@ -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 {
|
|
@@ -41,8 +40,8 @@ class StabilityPlusAI extends stabilityai_1.default {
|
|
|
41
40
|
"hr_resize_x": 0,
|
|
42
41
|
"hr_resize_y": 0,
|
|
43
42
|
"prompt": chatText,
|
|
44
|
-
"styles": [this.apiSetting.engine || "bra_v5"],
|
|
45
|
-
"seed": -1,
|
|
43
|
+
"styles": [paramOption.engine || this.apiSetting.engine || "bra_v5"],
|
|
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
package/src/stabilityai.ts
CHANGED
|
@@ -72,9 +72,11 @@ 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
|
-
'negative'?:string
|
|
78
|
+
'negative'?:string,
|
|
79
|
+
'engine'?:string
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
export interface StabilityResult extends ApiResult {
|
package/src/stabilityplusai.ts
CHANGED
|
@@ -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 {
|
|
@@ -30,8 +29,8 @@ export default class StabilityPlusAI extends StabilityAI {
|
|
|
30
29
|
"hr_resize_x": 0,
|
|
31
30
|
"hr_resize_y": 0,
|
|
32
31
|
"prompt": chatText,
|
|
33
|
-
"styles": [this.apiSetting.engine || "bra_v5"], //["bra_v5"], //模型
|
|
34
|
-
"seed": -1,
|
|
32
|
+
"styles": [paramOption.engine || this.apiSetting.engine || "bra_v5"], //["bra_v5"], //模型
|
|
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,
|