comfyui-workflow-builder 1.0.3 → 1.0.5
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/{src/index.d.ts → index.d.ts} +5 -0
- package/dist/{src/index.js → index.js} +5 -0
- package/dist/nodes/ConditioningZeroOutNode.d.ts +25 -0
- package/dist/nodes/ConditioningZeroOutNode.js +30 -0
- package/dist/{src/nodes → nodes}/EmptyLatentImage.d.ts +12 -0
- package/dist/{src/nodes → nodes}/EmptyLatentImage.js +13 -0
- package/dist/nodes/LoadClipNode.d.ts +31 -0
- package/dist/nodes/LoadClipNode.js +31 -0
- package/dist/nodes/LoadDiffusionModelNode.d.ts +27 -0
- package/dist/nodes/LoadDiffusionModelNode.js +29 -0
- package/dist/nodes/LoadVaeNode.d.ts +25 -0
- package/dist/nodes/LoadVaeNode.js +27 -0
- package/dist/nodes/ModelSamplingAuraFlowNode.d.ts +28 -0
- package/dist/nodes/ModelSamplingAuraFlowNode.js +32 -0
- package/dist/{src/workflows → workflows}/ImageGenerationWorkflow.d.ts +12 -0
- package/dist/{src/workflows → workflows}/ImageGenerationWorkflow.js +76 -0
- package/dist/{src/workflows → workflows}/types.d.ts +5 -0
- package/package.json +3 -3
- package/dist/docs/assets/hierarchy.d.ts +0 -1
- package/dist/docs/assets/hierarchy.js +0 -2
- package/dist/docs/assets/icons.d.ts +0 -1
- package/dist/docs/assets/icons.js +0 -20
- package/dist/docs/assets/main.d.ts +0 -1
- package/dist/docs/assets/main.js +0 -747
- package/dist/docs/assets/navigation.d.ts +0 -1
- package/dist/docs/assets/navigation.js +0 -2
- package/dist/docs/assets/search.d.ts +0 -1
- package/dist/docs/assets/search.js +0 -2
- /package/dist/{src/nodes → nodes}/BaseNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/BaseNode.js +0 -0
- /package/dist/{src/nodes → nodes}/ClipTextEncode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/ClipTextEncode.js +0 -0
- /package/dist/{src/nodes → nodes}/KSamplerNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/KSamplerNode.js +0 -0
- /package/dist/{src/nodes → nodes}/LoadCheckpoint.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/LoadCheckpoint.js +0 -0
- /package/dist/{src/nodes → nodes}/LoadImageNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/LoadImageNode.js +0 -0
- /package/dist/{src/nodes → nodes}/SaveImageNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/SaveImageNode.js +0 -0
- /package/dist/{src/nodes → nodes}/VAEDecodeNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/VAEDecodeNode.js +0 -0
- /package/dist/{src/nodes → nodes}/VAEEncodeNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/VAEEncodeNode.js +0 -0
- /package/dist/{src/nodes → nodes}/custom_nodes/comfyui-easy-use/EasyApplyLoraStackNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/custom_nodes/comfyui-easy-use/EasyApplyLoraStackNode.js +0 -0
- /package/dist/{src/nodes → nodes}/custom_nodes/comfyui-easy-use/EasyLoraStackNode.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/custom_nodes/comfyui-easy-use/EasyLoraStackNode.js +0 -0
- /package/dist/{src/nodes → nodes}/custom_nodes/comfyui-easy-use/outputs.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/custom_nodes/comfyui-easy-use/outputs.js +0 -0
- /package/dist/{src/nodes → nodes}/outputs/Providers.d.ts +0 -0
- /package/dist/{src/nodes → nodes}/outputs/Providers.js +0 -0
- /package/dist/{src/workflows → workflows}/BaseWorkflow.d.ts +0 -0
- /package/dist/{src/workflows → workflows}/BaseWorkflow.js +0 -0
- /package/dist/{src/workflows → workflows}/types.js +0 -0
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export * from "./nodes/BaseNode";
|
|
2
2
|
export * from "./nodes/ClipTextEncode";
|
|
3
|
+
export * from "./nodes/ConditioningZeroOutNode";
|
|
3
4
|
export * from "./nodes/EmptyLatentImage";
|
|
4
5
|
export * from "./nodes/KSamplerNode";
|
|
5
6
|
export * from "./nodes/LoadCheckpoint";
|
|
7
|
+
export * from "./nodes/LoadDiffusionModelNode";
|
|
6
8
|
export * from "./nodes/LoadImageNode";
|
|
9
|
+
export * from "./nodes/LoadClipNode";
|
|
10
|
+
export * from "./nodes/LoadVaeNode";
|
|
11
|
+
export * from "./nodes/ModelSamplingAuraFlowNode";
|
|
7
12
|
export * from "./nodes/SaveImageNode";
|
|
8
13
|
export * from "./nodes/VAEDecodeNode";
|
|
9
14
|
export * from "./nodes/VAEEncodeNode";
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
// Standard Nodes
|
|
2
2
|
export * from "./nodes/BaseNode";
|
|
3
3
|
export * from "./nodes/ClipTextEncode";
|
|
4
|
+
export * from "./nodes/ConditioningZeroOutNode";
|
|
4
5
|
export * from "./nodes/EmptyLatentImage";
|
|
5
6
|
export * from "./nodes/KSamplerNode";
|
|
6
7
|
export * from "./nodes/LoadCheckpoint";
|
|
8
|
+
export * from "./nodes/LoadDiffusionModelNode";
|
|
7
9
|
export * from "./nodes/LoadImageNode";
|
|
10
|
+
export * from "./nodes/LoadClipNode";
|
|
11
|
+
export * from "./nodes/LoadVaeNode";
|
|
12
|
+
export * from "./nodes/ModelSamplingAuraFlowNode";
|
|
8
13
|
export * from "./nodes/SaveImageNode";
|
|
9
14
|
export * from "./nodes/VAEDecodeNode";
|
|
10
15
|
export * from "./nodes/VAEEncodeNode";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
import type { ConditioningProviderNode } from "./outputs/Providers";
|
|
3
|
+
/**
|
|
4
|
+
* Conditioning Zero Out node
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This node zeros out the conditioning.
|
|
8
|
+
*
|
|
9
|
+
* @category Standard Nodes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const conditioningZeroOutNode = new ConditioningZeroOutNode({
|
|
14
|
+
* conditioning: conditioningNode
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class ConditioningZeroOutNode extends BaseNode implements ConditioningProviderNode {
|
|
19
|
+
readonly CONDITIONING_OUTPUT = 0;
|
|
20
|
+
get CONDITIONING(): number;
|
|
21
|
+
constructor(options: {
|
|
22
|
+
/** The conditioning to zero out. */
|
|
23
|
+
conditioning: ConditioningProviderNode;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
/**
|
|
3
|
+
* Conditioning Zero Out node
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This node zeros out the conditioning.
|
|
7
|
+
*
|
|
8
|
+
* @category Standard Nodes
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const conditioningZeroOutNode = new ConditioningZeroOutNode({
|
|
13
|
+
* conditioning: conditioningNode
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export class ConditioningZeroOutNode extends BaseNode {
|
|
18
|
+
CONDITIONING_OUTPUT = 0;
|
|
19
|
+
get CONDITIONING() {
|
|
20
|
+
return this.CONDITIONING_OUTPUT;
|
|
21
|
+
}
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super("ConditioningZeroOut", "Conditioning Zero Out", {
|
|
24
|
+
conditioning: [
|
|
25
|
+
options.conditioning.node_id,
|
|
26
|
+
options.conditioning.CONDITIONING
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -25,3 +25,15 @@ export declare class EmptyLatentImageNode extends BaseNode implements LatentImag
|
|
|
25
25
|
batch_size?: number;
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
+
export declare class EmptySD3LatentImageNode extends BaseNode implements LatentImageProviderNode {
|
|
29
|
+
readonly LATENT_IMAGE_OUTPUT = 0;
|
|
30
|
+
get LATENT_IMAGE(): number;
|
|
31
|
+
constructor(options?: {
|
|
32
|
+
/** The width of the latent image. Defaults to 1024. */
|
|
33
|
+
width?: number;
|
|
34
|
+
/** The height of the latent image. Defaults to 1024. */
|
|
35
|
+
height?: number;
|
|
36
|
+
/** The batch size of the latent image. Defaults to 1. */
|
|
37
|
+
batch_size?: number;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -25,3 +25,16 @@ export class EmptyLatentImageNode extends BaseNode {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
export class EmptySD3LatentImageNode extends BaseNode {
|
|
29
|
+
LATENT_IMAGE_OUTPUT = 0;
|
|
30
|
+
get LATENT_IMAGE() {
|
|
31
|
+
return this.LATENT_IMAGE_OUTPUT;
|
|
32
|
+
}
|
|
33
|
+
constructor(options) {
|
|
34
|
+
super("EmptySD3LatentImage", "Empty SD3 Latent Image", {
|
|
35
|
+
width: options?.width ?? 1024,
|
|
36
|
+
height: options?.height ?? 1024,
|
|
37
|
+
batch_size: options?.batch_size ?? 1
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
import type { ClipProviderNode } from "./outputs/Providers";
|
|
3
|
+
/**
|
|
4
|
+
* Load CLIP node
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This node loads a CLIP model.
|
|
8
|
+
*
|
|
9
|
+
* @category Standard Nodes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const loadClipNode = new LoadClipNode({
|
|
14
|
+
* clip_name: "clip_name",
|
|
15
|
+
* type: "lumina2",
|
|
16
|
+
* device: "default"
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class LoadClipNode extends BaseNode implements ClipProviderNode {
|
|
21
|
+
readonly CLIP_OUTPUT = 0;
|
|
22
|
+
get CLIP(): number;
|
|
23
|
+
constructor(options: {
|
|
24
|
+
/** The name of the clip to load. */
|
|
25
|
+
clip_name: string;
|
|
26
|
+
/** The type of the clip to load. */
|
|
27
|
+
type: string;
|
|
28
|
+
/** The device to load the clip on. */
|
|
29
|
+
device?: string;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
/**
|
|
3
|
+
* Load CLIP node
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This node loads a CLIP model.
|
|
7
|
+
*
|
|
8
|
+
* @category Standard Nodes
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const loadClipNode = new LoadClipNode({
|
|
13
|
+
* clip_name: "clip_name",
|
|
14
|
+
* type: "lumina2",
|
|
15
|
+
* device: "default"
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export class LoadClipNode extends BaseNode {
|
|
20
|
+
CLIP_OUTPUT = 0;
|
|
21
|
+
get CLIP() {
|
|
22
|
+
return this.CLIP_OUTPUT;
|
|
23
|
+
}
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super("CLIPLoader", "Load CLIP", {
|
|
26
|
+
clip_name: options.clip_name,
|
|
27
|
+
type: options.type,
|
|
28
|
+
device: options.device ?? 'default'
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
import type { ModelProviderNode } from "./outputs/Providers";
|
|
3
|
+
/**
|
|
4
|
+
* Load Diffusion Model node
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This node loads a diffusion model.
|
|
8
|
+
*
|
|
9
|
+
* @category Standard Nodes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const loadDiffusionModelNode = new LoadDiffusionModelNode({
|
|
14
|
+
* diffusion_model_name: "diffusion_model_name",
|
|
15
|
+
* weight_type: "default"
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class LoadDiffusionModelNode extends BaseNode implements ModelProviderNode {
|
|
20
|
+
readonly MODEL_OUTPUT = 0;
|
|
21
|
+
get MODEL(): number;
|
|
22
|
+
constructor(options: {
|
|
23
|
+
/** The name of the diffusion model to load. */
|
|
24
|
+
diffusion_model_name: string;
|
|
25
|
+
weight_type?: string;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
/**
|
|
3
|
+
* Load Diffusion Model node
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This node loads a diffusion model.
|
|
7
|
+
*
|
|
8
|
+
* @category Standard Nodes
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const loadDiffusionModelNode = new LoadDiffusionModelNode({
|
|
13
|
+
* diffusion_model_name: "diffusion_model_name",
|
|
14
|
+
* weight_type: "default"
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export class LoadDiffusionModelNode extends BaseNode {
|
|
19
|
+
MODEL_OUTPUT = 0;
|
|
20
|
+
get MODEL() {
|
|
21
|
+
return this.MODEL_OUTPUT;
|
|
22
|
+
}
|
|
23
|
+
constructor(options) {
|
|
24
|
+
super("UNETLoader", "Load Diffusion Model", {
|
|
25
|
+
diffusion_model_name: options.diffusion_model_name,
|
|
26
|
+
weight_type: options.weight_type ?? 'default'
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
import type { VaeProviderNode } from "./outputs/Providers";
|
|
3
|
+
/**
|
|
4
|
+
* Load VAE node
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This node loads a VAE.
|
|
8
|
+
*
|
|
9
|
+
* @category Standard Nodes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const loadVaeNode = new LoadVaeNode({
|
|
14
|
+
* vae_name: "vae_name"
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class LoadVaeNode extends BaseNode implements VaeProviderNode {
|
|
19
|
+
readonly VAE_OUTPUT = 0;
|
|
20
|
+
get VAE(): number;
|
|
21
|
+
constructor(options: {
|
|
22
|
+
/** The name of the vae to load. */
|
|
23
|
+
vae_name: string;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
/**
|
|
3
|
+
* Load VAE node
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This node loads a VAE.
|
|
7
|
+
*
|
|
8
|
+
* @category Standard Nodes
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const loadVaeNode = new LoadVaeNode({
|
|
13
|
+
* vae_name: "vae_name"
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export class LoadVaeNode extends BaseNode {
|
|
18
|
+
VAE_OUTPUT = 0;
|
|
19
|
+
get VAE() {
|
|
20
|
+
return this.VAE_OUTPUT;
|
|
21
|
+
}
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super("VAELoader", "Load VAE", {
|
|
24
|
+
vae_name: options.vae_name
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
import type { ModelProviderNode } from "./outputs/Providers";
|
|
3
|
+
/**
|
|
4
|
+
* Model Sampling Aura Flow node
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This node samples from a model using the Model Sampling Aura Flow algorithm.
|
|
8
|
+
*
|
|
9
|
+
* @category Standard Nodes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const modelSamplingAuraFlowNode = new ModelSamplingAuraFlowNode({
|
|
14
|
+
* shift: 3,
|
|
15
|
+
* model: modelNode
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class ModelSamplingAuraFlowNode extends BaseNode implements ModelProviderNode {
|
|
20
|
+
readonly MODEL_OUTPUT = 0;
|
|
21
|
+
get MODEL(): number;
|
|
22
|
+
constructor(options: {
|
|
23
|
+
/** The shift of the model. Defaults to 3. */
|
|
24
|
+
shift?: number;
|
|
25
|
+
/** The model to use. */
|
|
26
|
+
model: ModelProviderNode;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseNode } from "./BaseNode";
|
|
2
|
+
/**
|
|
3
|
+
* Model Sampling Aura Flow node
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This node samples from a model using the Model Sampling Aura Flow algorithm.
|
|
7
|
+
*
|
|
8
|
+
* @category Standard Nodes
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const modelSamplingAuraFlowNode = new ModelSamplingAuraFlowNode({
|
|
13
|
+
* shift: 3,
|
|
14
|
+
* model: modelNode
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export class ModelSamplingAuraFlowNode extends BaseNode {
|
|
19
|
+
MODEL_OUTPUT = 0;
|
|
20
|
+
get MODEL() {
|
|
21
|
+
return this.MODEL_OUTPUT;
|
|
22
|
+
}
|
|
23
|
+
constructor(options) {
|
|
24
|
+
super("ModelSamplingAuraFlow", "Model Sampling Aura Flow", {
|
|
25
|
+
shift: options.shift ?? 3,
|
|
26
|
+
model: [
|
|
27
|
+
options.model.node_id,
|
|
28
|
+
options.model.MODEL
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -13,3 +13,15 @@ import type { ImageGenerationWorkflowInput } from "./types";
|
|
|
13
13
|
* @returns The constructed workflow.
|
|
14
14
|
*/
|
|
15
15
|
export declare function basicImageGenerationWorkflow(input: ImageGenerationWorkflowInput): BaseWorkflow;
|
|
16
|
+
/**
|
|
17
|
+
* Z Image Turbo Generation Workflow
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Creates a workflow for image generation using the Z method.
|
|
21
|
+
*
|
|
22
|
+
* @category Workflows
|
|
23
|
+
*
|
|
24
|
+
* @param input - The input configuration for the workflow.
|
|
25
|
+
* @returns The constructed workflow.
|
|
26
|
+
*/
|
|
27
|
+
export declare function zImageGenerationWorkflow(input: ImageGenerationWorkflowInput): BaseWorkflow;
|
|
@@ -9,6 +9,11 @@ import { EasyApplyLoraStackNode } from "../nodes/custom_nodes/comfyui-easy-use/E
|
|
|
9
9
|
import { EasyLoraStackNode } from "../nodes/custom_nodes/comfyui-easy-use/EasyLoraStackNode";
|
|
10
10
|
import { LoadImageNode } from "../nodes/LoadImageNode";
|
|
11
11
|
import { VAEEncodeNode } from "../nodes/VAEEncodeNode";
|
|
12
|
+
import { LoadDiffusionModelNode } from "../nodes/LoadDiffusionModelNode";
|
|
13
|
+
import { LoadClipNode } from "../nodes/LoadClipNode";
|
|
14
|
+
import { LoadVaeNode } from "../nodes/LoadVaeNode";
|
|
15
|
+
import { ConditioningZeroOutNode } from "../nodes/ConditioningZeroOutNode";
|
|
16
|
+
import { ModelSamplingAuraFlowNode } from "../nodes/ModelSamplingAuraFlowNode";
|
|
12
17
|
/**
|
|
13
18
|
* Basic Image Generation Workflow
|
|
14
19
|
*
|
|
@@ -94,3 +99,74 @@ export function basicImageGenerationWorkflow(input) {
|
|
|
94
99
|
workflow.addNode(saveImageNode);
|
|
95
100
|
return workflow;
|
|
96
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Z Image Turbo Generation Workflow
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* Creates a workflow for image generation using the Z method.
|
|
107
|
+
*
|
|
108
|
+
* @category Workflows
|
|
109
|
+
*
|
|
110
|
+
* @param input - The input configuration for the workflow.
|
|
111
|
+
* @returns The constructed workflow.
|
|
112
|
+
*/
|
|
113
|
+
export function zImageGenerationWorkflow(input) {
|
|
114
|
+
const workflow = new BaseWorkflow();
|
|
115
|
+
const loadDiffusionModelNode = new LoadDiffusionModelNode({
|
|
116
|
+
diffusion_model_name: input.checkpointName,
|
|
117
|
+
weight_type: input.weightDtype
|
|
118
|
+
});
|
|
119
|
+
workflow.addNode(loadDiffusionModelNode);
|
|
120
|
+
const modelSamplingAuraFlowNode = new ModelSamplingAuraFlowNode({
|
|
121
|
+
shift: 6,
|
|
122
|
+
model: loadDiffusionModelNode
|
|
123
|
+
});
|
|
124
|
+
workflow.addNode(modelSamplingAuraFlowNode);
|
|
125
|
+
const loadClipNode = new LoadClipNode({
|
|
126
|
+
clip_name: input.clipName ?? "qwen_3_4b.safetensors",
|
|
127
|
+
type: input.clipType ?? "lumina2",
|
|
128
|
+
device: input.clipDevice
|
|
129
|
+
});
|
|
130
|
+
workflow.addNode(loadClipNode);
|
|
131
|
+
const loadVaeNode = new LoadVaeNode({
|
|
132
|
+
vae_name: input.vaeName ?? "ae.safetensors"
|
|
133
|
+
});
|
|
134
|
+
workflow.addNode(loadVaeNode);
|
|
135
|
+
const emptyLatentImageNode = new EmptyLatentImageNode({
|
|
136
|
+
width: input.width,
|
|
137
|
+
height: input.height,
|
|
138
|
+
batch_size: input.batch_size
|
|
139
|
+
});
|
|
140
|
+
workflow.addNode(emptyLatentImageNode);
|
|
141
|
+
const positivePrompt = new ClipTextEncodeNode({
|
|
142
|
+
text: input.positivePromptText,
|
|
143
|
+
clipProvider: loadClipNode
|
|
144
|
+
});
|
|
145
|
+
workflow.addNode(positivePrompt);
|
|
146
|
+
const conditioningZeroOutNode = new ConditioningZeroOutNode({
|
|
147
|
+
conditioning: positivePrompt
|
|
148
|
+
});
|
|
149
|
+
workflow.addNode(conditioningZeroOutNode);
|
|
150
|
+
const kSamplerNode = new KSamplerNode({
|
|
151
|
+
seed: input.seed,
|
|
152
|
+
steps: input.steps,
|
|
153
|
+
cfg: input.cfg,
|
|
154
|
+
samplerName: input.sampler,
|
|
155
|
+
denoise: input.denoise,
|
|
156
|
+
model: modelSamplingAuraFlowNode,
|
|
157
|
+
positiveConditioning: positivePrompt,
|
|
158
|
+
negativeConditioning: conditioningZeroOutNode,
|
|
159
|
+
latentImage: emptyLatentImageNode
|
|
160
|
+
});
|
|
161
|
+
workflow.addNode(kSamplerNode);
|
|
162
|
+
const vaeDecodeNode = new VAEDecodeNode({
|
|
163
|
+
samples: kSamplerNode,
|
|
164
|
+
vae: loadVaeNode
|
|
165
|
+
});
|
|
166
|
+
workflow.addNode(vaeDecodeNode);
|
|
167
|
+
const saveImageNode = new SaveImageNode({
|
|
168
|
+
image: vaeDecodeNode
|
|
169
|
+
});
|
|
170
|
+
workflow.addNode(saveImageNode);
|
|
171
|
+
return workflow;
|
|
172
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comfyui-workflow-builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./dist/
|
|
6
|
-
"types": "./dist/
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
window.hierarchyData = "eJyd1cFuozAQBuB3mfN0ywAxhlu3m0PV7PaQqpcqBwvcBgVshJ3VRhXvXtGolUmysumFg/Vb3y9rNLxBr7U1UDwzJB4j5RFSzpHyFCnjG4RevjSytLVWBoo3YONHiVZCAT+FkX90JQFhV6sKCoo5wr5voICyEcZIc/2Z+bG1bQN4PIcCrKmuxktXxwOEcls3VS8VFM+UYUKYMmQceYYURUhESPECKcmRWLwZEChzqtw2dfco/9mlKnXlLXWe9tQbEBJyuGXb2cNKWKnsXSteveClvJ9M3ce+X4u2a2Tvo9ycn2DcIVZaVLdbWe46XSvrg87Tfo5nJ1zQ602CfoSiyFHW4q8MUibBAIXcgXi6Wf6SIaM3CQYo8WKqhA34JBigJLk73MIcbrquOax0L9ZWlDvveF+8EeCy+MSdRc7VMnfYH/a221vzW1ey+YLiBfuEamVl/yJKaa7d6H+Zr/zJLkvyj2XF43N7XENh9Jj8hoyMf+B5dAHXqqrHtV6r18ASzo3ZZbJjkfS8iLMWw3o4F+bWSNn4FzlWuTAMM0p8i+fZZhiGd9+fcE4=";
|
|
2
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
addIcons();
|
|
3
|
-
function addIcons() {
|
|
4
|
-
if (document.readyState === "loading")
|
|
5
|
-
return document.addEventListener("DOMContentLoaded", addIcons);
|
|
6
|
-
const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
|
|
7
|
-
svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g>`;
|
|
8
|
-
svg.style.display = "none";
|
|
9
|
-
if (location.protocol === "file:")
|
|
10
|
-
updateUseElements();
|
|
11
|
-
}
|
|
12
|
-
function updateUseElements() {
|
|
13
|
-
document.querySelectorAll("use").forEach(el => {
|
|
14
|
-
if (el.getAttribute("href").includes("#icon-")) {
|
|
15
|
-
el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
})();
|
|
20
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|