comfyui-node 1.6.2 → 1.6.4

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.
Files changed (69) hide show
  1. package/README.md +50 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/index.d.ts +18 -13
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +10 -7
  6. package/dist/index.js.map +1 -1
  7. package/dist/multipool/client-registry.d.ts +23 -32
  8. package/dist/multipool/client-registry.d.ts.map +1 -1
  9. package/dist/multipool/client-registry.js +152 -152
  10. package/dist/multipool/client-registry.js.map +1 -1
  11. package/dist/multipool/helpers.js +52 -52
  12. package/dist/multipool/helpers.js.map +1 -1
  13. package/dist/multipool/index.js +2 -2
  14. package/dist/multipool/interfaces.d.ts +135 -12
  15. package/dist/multipool/interfaces.d.ts.map +1 -1
  16. package/dist/multipool/interfaces.js +1 -1
  17. package/dist/multipool/job-profiler.d.ts +64 -127
  18. package/dist/multipool/job-profiler.d.ts.map +1 -1
  19. package/dist/multipool/job-profiler.js +221 -221
  20. package/dist/multipool/job-profiler.js.map +1 -1
  21. package/dist/multipool/job-queue-processor.d.ts +23 -27
  22. package/dist/multipool/job-queue-processor.d.ts.map +1 -1
  23. package/dist/multipool/job-queue-processor.js +196 -196
  24. package/dist/multipool/job-queue-processor.js.map +1 -1
  25. package/dist/multipool/job-state-registry.d.ts +42 -66
  26. package/dist/multipool/job-state-registry.d.ts.map +1 -1
  27. package/dist/multipool/job-state-registry.js +282 -282
  28. package/dist/multipool/job-state-registry.js.map +1 -1
  29. package/dist/multipool/multi-workflow-pool.d.ts +101 -42
  30. package/dist/multipool/multi-workflow-pool.d.ts.map +1 -1
  31. package/dist/multipool/multi-workflow-pool.js +424 -313
  32. package/dist/multipool/multi-workflow-pool.js.map +1 -1
  33. package/dist/multipool/pool-event-manager.d.ts +10 -10
  34. package/dist/multipool/pool-event-manager.d.ts.map +1 -1
  35. package/dist/multipool/pool-event-manager.js +27 -27
  36. package/dist/multipool/tests/client-registry-api-demo.d.ts +7 -0
  37. package/dist/multipool/tests/client-registry-api-demo.d.ts.map +1 -0
  38. package/dist/multipool/tests/client-registry-api-demo.js +136 -0
  39. package/dist/multipool/tests/client-registry-api-demo.js.map +1 -0
  40. package/dist/multipool/tests/client-registry.spec.d.ts +2 -0
  41. package/dist/multipool/tests/client-registry.spec.d.ts.map +1 -0
  42. package/dist/multipool/tests/client-registry.spec.js +191 -0
  43. package/dist/multipool/tests/client-registry.spec.js.map +1 -0
  44. package/dist/multipool/tests/error-classification-tests.js +373 -373
  45. package/dist/multipool/tests/event-forwarding-demo.d.ts +7 -0
  46. package/dist/multipool/tests/event-forwarding-demo.d.ts.map +1 -0
  47. package/dist/multipool/tests/event-forwarding-demo.js +88 -0
  48. package/dist/multipool/tests/event-forwarding-demo.js.map +1 -0
  49. package/dist/multipool/tests/helpers.spec.d.ts +2 -0
  50. package/dist/multipool/tests/helpers.spec.d.ts.map +1 -0
  51. package/dist/multipool/tests/helpers.spec.js +100 -0
  52. package/dist/multipool/tests/helpers.spec.js.map +1 -0
  53. package/dist/multipool/tests/job-queue-processor.spec.d.ts +2 -0
  54. package/dist/multipool/tests/job-queue-processor.spec.d.ts.map +1 -0
  55. package/dist/multipool/tests/job-queue-processor.spec.js +89 -0
  56. package/dist/multipool/tests/job-queue-processor.spec.js.map +1 -0
  57. package/dist/multipool/tests/job-state-registry.spec.d.ts +2 -0
  58. package/dist/multipool/tests/job-state-registry.spec.d.ts.map +1 -0
  59. package/dist/multipool/tests/job-state-registry.spec.js +143 -0
  60. package/dist/multipool/tests/job-state-registry.spec.js.map +1 -0
  61. package/dist/multipool/tests/multipool-basic.js +141 -141
  62. package/dist/multipool/tests/profiling-demo.js +87 -87
  63. package/dist/multipool/tests/profiling-demo.js.map +1 -1
  64. package/dist/multipool/tests/two-stage-edit-simulation.js +298 -298
  65. package/dist/multipool/tests/two-stage-edit-simulation.js.map +1 -1
  66. package/dist/multipool/workflow.d.ts +178 -178
  67. package/dist/multipool/workflow.d.ts.map +1 -1
  68. package/dist/multipool/workflow.js +333 -333
  69. package/package.json +1 -1
@@ -1,13 +1,136 @@
1
- import { LogLevel } from "./logger.js";
2
- export interface PoolEvent {
3
- type: string;
4
- payload: any;
5
- }
6
- export interface MultiWorkflowPoolOptions {
7
- connectionTimeoutMs?: number;
8
- enableMonitoring?: boolean;
9
- monitoringIntervalMs?: number;
10
- logLevel?: LogLevel;
11
- enableProfiling?: boolean;
12
- }
1
+ import { ImageInfo } from "../types/api.js";
2
+ import { ComfyApi } from "../client.js";
3
+ import { LogLevel } from "./logger.js";
4
+ import { Workflow } from "./workflow.js";
5
+ import { JobProfiler } from "./job-profiler.js";
6
+ /**
7
+ * Pool event emitted through PoolEventManager
8
+ * All ComfyUI client events are forwarded with the prefix "client:"
9
+ */
10
+ export interface PoolEvent {
11
+ type: string;
12
+ payload: any;
13
+ }
14
+ /**
15
+ * Client event payload forwarded from ComfyUI WebSocket events
16
+ */
17
+ export interface ClientEventPayload {
18
+ /** URL of the client that emitted the event */
19
+ clientUrl: string;
20
+ /** Node name of the client */
21
+ clientName: string;
22
+ /** Original ComfyUI event type (status, progress, executing, etc.) */
23
+ eventType: string;
24
+ /** Original event data from ComfyUI */
25
+ eventData: any;
26
+ }
27
+ export interface MultiWorkflowPoolOptions {
28
+ connectionTimeoutMs?: number;
29
+ enableMonitoring?: boolean;
30
+ monitoringIntervalMs?: number;
31
+ logLevel?: LogLevel;
32
+ enableProfiling?: boolean;
33
+ }
34
+ export type ClientState = "idle" | "busy" | "offline";
35
+ export interface EnhancedClient {
36
+ url: string;
37
+ state: ClientState;
38
+ nodeName: string;
39
+ priority?: number;
40
+ api: ComfyApi;
41
+ workflowAffinity?: Set<string>;
42
+ }
43
+ export interface NodeExecutionProfile {
44
+ /** Node ID */
45
+ nodeId: string;
46
+ /** Node class type (e.g., KSampler, VAELoader) */
47
+ type?: string;
48
+ /** Node title/label */
49
+ title?: string;
50
+ /** Timestamp when node started executing (ms since epoch) */
51
+ startedAt?: number;
52
+ /** Timestamp when node completed (ms since epoch) */
53
+ completedAt?: number;
54
+ /** Execution duration in milliseconds */
55
+ duration?: number;
56
+ /** Progress events captured for this node */
57
+ progressEvents?: Array<{
58
+ timestamp: number;
59
+ value: number;
60
+ max: number;
61
+ }>;
62
+ /** Whether this node was cached (instant execution) */
63
+ cached: boolean;
64
+ /** Execution status */
65
+ status: 'pending' | 'executing' | 'completed' | 'cached' | 'failed';
66
+ /** Error message if failed */
67
+ error?: string;
68
+ }
69
+ export interface JobProfileStats {
70
+ /** Prompt ID from ComfyUI */
71
+ promptId?: string;
72
+ /** Total execution time from queue to completion (ms) */
73
+ totalDuration: number;
74
+ /** Time spent in queue before execution started (ms) */
75
+ queueTime: number;
76
+ /** Actual execution time (ms) */
77
+ executionTime: number;
78
+ /** Timestamp when job was queued */
79
+ queuedAt: number;
80
+ /** Timestamp when execution started */
81
+ startedAt?: number;
82
+ /** Timestamp when execution completed */
83
+ completedAt: number;
84
+ /** Per-node execution profiles */
85
+ nodes: NodeExecutionProfile[];
86
+ /** Execution timeline summary */
87
+ summary: {
88
+ /** Total number of nodes in workflow */
89
+ totalNodes: number;
90
+ /** Number of nodes actually executed */
91
+ executedNodes: number;
92
+ /** Number of cached nodes */
93
+ cachedNodes: number;
94
+ /** Number of failed nodes */
95
+ failedNodes: number;
96
+ /** Slowest nodes (top 5) */
97
+ slowestNodes: Array<{
98
+ nodeId: string;
99
+ type?: string;
100
+ title?: string;
101
+ duration: number;
102
+ }>;
103
+ /** Nodes that emitted progress events */
104
+ progressNodes: string[];
105
+ };
106
+ }
107
+ export interface QueueJob {
108
+ jobId: string;
109
+ workflow: Workflow;
110
+ attempts: number;
111
+ }
112
+ export type JobStatus = "pending" | "assigned" | "running" | "completed" | "failed" | "canceled" | "no_clients";
113
+ export type JobResultStatus = "completed" | "failed" | "canceled";
114
+ export interface JobState {
115
+ jobId: string;
116
+ prompt_id?: string;
117
+ assignedClientUrl?: string;
118
+ workflow: Workflow;
119
+ status: JobStatus;
120
+ autoSeeds?: Record<string, number>;
121
+ resolver: ((results: JobResults) => void) | null;
122
+ resultsPromise?: Promise<JobResults>;
123
+ images?: ImageInfo[];
124
+ onProgress?: (progress: any) => void;
125
+ onPreview?: (preview: any) => void;
126
+ profiler?: JobProfiler;
127
+ }
128
+ export interface JobResults {
129
+ status: JobResultStatus;
130
+ jobId: string;
131
+ prompt_id: string;
132
+ images: string[];
133
+ error?: any;
134
+ profileStats?: JobProfileStats;
135
+ }
13
136
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/multipool/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/multipool/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE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MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAC;AAChH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=interfaces.js.map
@@ -1,128 +1,65 @@
1
- /**
2
- * Job Profiler for MultiWorkflowPool - Automatic per-node execution profiling
3
- * ===========================================================================
4
- *
5
- * Captures detailed execution metrics for workflow jobs automatically:
6
- * - Per-node execution timing
7
- * - Progress tracking for nodes that emit progress events
8
- * - Execution order and dependencies
9
- * - Node types and metadata
10
- *
11
- * Usage:
12
- * ```ts
13
- * const pool = new MultiWorkflowPool({ enableProfiling: true });
14
- * const jobId = await pool.submitJob(workflow);
15
- *
16
- * const results = await pool.waitForJobCompletion(jobId);
17
- * console.log(results.profileStats);
18
- * ```
19
- */
20
- export interface NodeExecutionProfile {
21
- /** Node ID */
22
- nodeId: string;
23
- /** Node class type (e.g., KSampler, VAELoader) */
24
- type?: string;
25
- /** Node title/label */
26
- title?: string;
27
- /** Timestamp when node started executing (ms since epoch) */
28
- startedAt?: number;
29
- /** Timestamp when node completed (ms since epoch) */
30
- completedAt?: number;
31
- /** Execution duration in milliseconds */
32
- duration?: number;
33
- /** Progress events captured for this node */
34
- progressEvents?: Array<{
35
- timestamp: number;
36
- value: number;
37
- max: number;
38
- }>;
39
- /** Whether this node was cached (instant execution) */
40
- cached: boolean;
41
- /** Execution status */
42
- status: 'pending' | 'executing' | 'completed' | 'cached' | 'failed';
43
- /** Error message if failed */
44
- error?: string;
45
- }
46
- export interface JobProfileStats {
47
- /** Prompt ID from ComfyUI */
48
- promptId?: string;
49
- /** Total execution time from queue to completion (ms) */
50
- totalDuration: number;
51
- /** Time spent in queue before execution started (ms) */
52
- queueTime: number;
53
- /** Actual execution time (ms) */
54
- executionTime: number;
55
- /** Timestamp when job was queued */
56
- queuedAt: number;
57
- /** Timestamp when execution started */
58
- startedAt?: number;
59
- /** Timestamp when execution completed */
60
- completedAt: number;
61
- /** Per-node execution profiles */
62
- nodes: NodeExecutionProfile[];
63
- /** Execution timeline summary */
64
- summary: {
65
- /** Total number of nodes in workflow */
66
- totalNodes: number;
67
- /** Number of nodes actually executed */
68
- executedNodes: number;
69
- /** Number of cached nodes */
70
- cachedNodes: number;
71
- /** Number of failed nodes */
72
- failedNodes: number;
73
- /** Slowest nodes (top 5) */
74
- slowestNodes: Array<{
75
- nodeId: string;
76
- type?: string;
77
- title?: string;
78
- duration: number;
79
- }>;
80
- /** Nodes that emitted progress events */
81
- progressNodes: string[];
82
- };
83
- }
84
- /**
85
- * JobProfiler tracks execution metrics for a single workflow job.
86
- */
87
- export declare class JobProfiler {
88
- private queuedAt;
89
- private startedAt?;
90
- private completedAt?;
91
- private promptId?;
92
- private nodeProfiles;
93
- private lastExecutingNode;
94
- constructor(queuedAt: number, workflowJson?: Record<string, any>);
95
- /**
96
- * Record execution start event
97
- */
98
- onExecutionStart(promptId: string): void;
99
- /**
100
- * Record cached nodes
101
- */
102
- onCachedNodes(nodeIds: string[]): void;
103
- /**
104
- * Record node execution start
105
- */
106
- onNodeExecuting(nodeId: string): void;
107
- /**
108
- * Record node completion (when next node starts or execution ends)
109
- */
110
- private completeNode;
111
- /**
112
- * Record execution end (node: null event)
113
- */
114
- onExecutionComplete(): void;
115
- /**
116
- * Record progress event for a node
117
- */
118
- onProgress(nodeId: string | number, value: number, max: number): void;
119
- /**
120
- * Record node execution error
121
- */
122
- onNodeError(nodeId: string, error: string): void;
123
- /**
124
- * Generate final profile statistics
125
- */
126
- getStats(): JobProfileStats;
127
- }
1
+ /**
2
+ * Job Profiler for MultiWorkflowPool - Automatic per-node execution profiling
3
+ * ===========================================================================
4
+ *
5
+ * Captures detailed execution metrics for workflow jobs automatically:
6
+ * - Per-node execution timing
7
+ * - Progress tracking for nodes that emit progress events
8
+ * - Execution order and dependencies
9
+ * - Node types and metadata
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * const pool = new MultiWorkflowPool({ enableProfiling: true });
14
+ * const jobId = await pool.submitJob(workflow);
15
+ *
16
+ * const results = await pool.waitForJobCompletion(jobId);
17
+ * console.log(results.profileStats);
18
+ * ```
19
+ */
20
+ import { JobProfileStats } from "./interfaces.js";
21
+ /**
22
+ * JobProfiler tracks execution metrics for a single workflow job.
23
+ */
24
+ export declare class JobProfiler {
25
+ private queuedAt;
26
+ private startedAt?;
27
+ private completedAt?;
28
+ private promptId?;
29
+ private nodeProfiles;
30
+ private lastExecutingNode;
31
+ constructor(queuedAt: number, workflowJson?: Record<string, any>);
32
+ /**
33
+ * Record execution start event
34
+ */
35
+ onExecutionStart(promptId: string): void;
36
+ /**
37
+ * Record cached nodes
38
+ */
39
+ onCachedNodes(nodeIds: string[]): void;
40
+ /**
41
+ * Record node execution start
42
+ */
43
+ onNodeExecuting(nodeId: string): void;
44
+ /**
45
+ * Record node completion (when next node starts or execution ends)
46
+ */
47
+ private completeNode;
48
+ /**
49
+ * Record execution end (node: null event)
50
+ */
51
+ onExecutionComplete(): void;
52
+ /**
53
+ * Record progress event for a node
54
+ */
55
+ onProgress(nodeId: string | number, value: number, max: number): void;
56
+ /**
57
+ * Record node execution error
58
+ */
59
+ onNodeError(nodeId: string, error: string): void;
60
+ /**
61
+ * Generate final profile statistics
62
+ */
63
+ getStats(): JobProfileStats;
64
+ }
128
65
  //# sourceMappingURL=job-profiler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"job-profiler.d.ts","sourceRoot":"","sources":["../../src/multipool/job-profiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;IACH,uDAAuD;IACvD,MAAM,EAAE,OAAO,CAAC;IAChB,uBAAuB;IACvB,MAAM,EAAE,SAAS,G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