@yetter/client 0.0.6 → 0.0.8

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/README.md CHANGED
@@ -61,6 +61,7 @@ async function main() {
61
61
  const result = await yetter.subscribe(model, {
62
62
  input: {
63
63
  prompt: "a vibrant coral reef, underwater photography",
64
+ num_inference_steps: 28, // Required
64
65
  },
65
66
  logs: true,
66
67
  onQueueUpdate: (update) => {
@@ -120,6 +121,7 @@ async function main() {
120
121
  const streamInstance = await yetter.stream(model, {
121
122
  input: {
122
123
  prompt: "a bioluminescent forest at night, fantasy art",
124
+ num_inference_steps: 28, // Required
123
125
  },
124
126
  });
125
127
  streamRequestId = streamInstance.getRequestId();
@@ -189,6 +191,7 @@ async function main() {
189
191
  const { request_id } = await yetter.queue.submit(model, {
190
192
  input: {
191
193
  prompt: "a fluffy white kitten playing with a yarn ball",
194
+ num_inference_steps: 28, // Required
192
195
  },
193
196
  });
194
197
  console.log("Request ID:", request_id);
package/dist/types.d.ts CHANGED
@@ -3,11 +3,12 @@ export interface ClientOptions {
3
3
  endpoint?: string;
4
4
  is_bearer?: boolean;
5
5
  }
6
+ export interface LoraWeight {
7
+ path: string;
8
+ scale?: number;
9
+ }
6
10
  export interface GenerateImageRequest {
7
- model: string;
8
- prompt: string;
9
- num_inference_steps?: number;
10
- seed?: number;
11
+ [key: string]: any;
11
12
  }
12
13
  export interface GenerateImageResponse {
13
14
  status: string;
@@ -3,14 +3,14 @@ import { yetter } from "../src/client.js";
3
3
  async function main() {
4
4
  const model = "ytr-ai/flux/dev";
5
5
  console.log("\n--- Starting Stream Test ---");
6
+ console.time("Stream Test");
6
7
  let streamRequestId = "";
7
8
 
8
9
  try {
9
10
  const streamInstance = await yetter.stream(model, {
10
11
  input: {
11
12
  prompt: "a bioluminescent forest at night, fantasy art",
12
- seed: 42
13
- // You can add other parameters like seed or num_inference_steps here
13
+ num_inference_steps: 28,
14
14
  },
15
15
  });
16
16
  streamRequestId = streamInstance.getRequestId();
@@ -37,7 +37,7 @@ async function main() {
37
37
  console.log("No images in final result.");
38
38
  }''
39
39
  console.log("Original Prompt:", result.prompt);
40
-
40
+ console.timeEnd("Stream Test");
41
41
  } catch (err: any) {
42
42
  console.error(`\n--- Stream Test Failed (Request ID: ${streamRequestId || 'UNKNOWN'}) ---`);
43
43
  console.error("Error during stream test:", err.message || err);
@@ -8,6 +8,7 @@ async function main() {
8
8
  const { request_id, status, queue_position } = await yetter.queue.submit(model, {
9
9
  input: {
10
10
  prompt: "a fluffy white kitten playing with a yarn ball",
11
+ num_inference_steps: 28,
11
12
  },
12
13
  });
13
14
 
@@ -5,9 +5,11 @@ async function main() {
5
5
  // Subscribe test
6
6
  try {
7
7
  console.log("\n--- Starting Subscribe Test ---");
8
+ console.time("Subscribe Test");
8
9
  const result = await yetter.subscribe(model, {
9
10
  input: {
10
11
  prompt: "a vibrant coral reef, underwater photography",
12
+ num_inference_steps: 28,
11
13
  },
12
14
  logs: true,
13
15
  onQueueUpdate: (update) => {
@@ -25,7 +27,7 @@ async function main() {
25
27
 
26
28
  console.log("\n--- Subscribe Test Result ---");
27
29
  console.log("Results:", result);
28
-
30
+ console.timeEnd("Subscribe Test");
29
31
  } catch (err: any) {
30
32
  console.error("\n--- Subscribe Test Failed ---");
31
33
  console.error("Error during subscribe:", err.message || err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yetter/client",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "tsc",
package/src/types.ts CHANGED
@@ -4,11 +4,13 @@ export interface ClientOptions {
4
4
  is_bearer?: boolean;
5
5
  }
6
6
 
7
+ export interface LoraWeight {
8
+ path: string;
9
+ scale?: number;
10
+ }
11
+
7
12
  export interface GenerateImageRequest {
8
- model: string;
9
- prompt: string;
10
- num_inference_steps?: number;
11
- seed?: number;
13
+ [key: string]: any;
12
14
  }
13
15
 
14
16
  export interface GenerateImageResponse {