@genfeedai/workflows 0.1.1 → 0.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.
- package/README.md +16 -0
- package/dist/chunk-CTZNKWZB.mjs +39 -0
- package/dist/contracts/index.d.mts +127 -0
- package/dist/contracts/index.d.ts +127 -0
- package/dist/contracts/index.js +66 -0
- package/dist/contracts/index.mjs +8 -0
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +149 -0
- package/dist/index.mjs +116 -0
- package/metadata/catalog.json +12 -0
- package/package.json +18 -11
- package/workflows/lora-dataset-generator.json +754 -0
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_RETRY_CONFIG,
|
|
3
|
+
InMemoryNodeRegistry
|
|
4
|
+
} from "./chunk-CTZNKWZB.mjs";
|
|
5
|
+
|
|
1
6
|
// src/comfyui/client.ts
|
|
2
7
|
var DEFAULT_POLL_MS = 2e3;
|
|
3
8
|
var DEFAULT_TIMEOUT_MS = 3e5;
|
|
@@ -962,6 +967,114 @@ function buildFlux2KleinPrompt(params) {
|
|
|
962
967
|
}
|
|
963
968
|
};
|
|
964
969
|
}
|
|
970
|
+
function buildZImageTurboLoraPrompt(params) {
|
|
971
|
+
const {
|
|
972
|
+
prompt,
|
|
973
|
+
loraPath,
|
|
974
|
+
seed = Math.floor(Math.random() * 2 ** 32),
|
|
975
|
+
width = 832,
|
|
976
|
+
height = 1216,
|
|
977
|
+
steps = 8,
|
|
978
|
+
loraStrength = 0.8,
|
|
979
|
+
upscaleModel = "4x-UltraSharp.pth"
|
|
980
|
+
} = params;
|
|
981
|
+
return {
|
|
982
|
+
"1": {
|
|
983
|
+
class_type: "UNETLoader",
|
|
984
|
+
inputs: {
|
|
985
|
+
unet_name: "z_image_turbo_bf16.safetensors",
|
|
986
|
+
weight_dtype: "default"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
"2": {
|
|
990
|
+
class_type: "CLIPLoader",
|
|
991
|
+
inputs: {
|
|
992
|
+
clip_name: "qwen_3_4b.safetensors",
|
|
993
|
+
type: "lumina2"
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"3": {
|
|
997
|
+
class_type: "LoraLoader",
|
|
998
|
+
inputs: {
|
|
999
|
+
model: ["1", 0],
|
|
1000
|
+
clip: ["2", 0],
|
|
1001
|
+
lora_name: loraPath,
|
|
1002
|
+
strength_model: loraStrength,
|
|
1003
|
+
strength_clip: loraStrength
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
"4": {
|
|
1007
|
+
class_type: "CLIPTextEncode",
|
|
1008
|
+
inputs: {
|
|
1009
|
+
text: prompt,
|
|
1010
|
+
clip: ["3", 1]
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
"5": {
|
|
1014
|
+
class_type: "CLIPTextEncode",
|
|
1015
|
+
inputs: {
|
|
1016
|
+
text: "",
|
|
1017
|
+
clip: ["3", 1]
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
"6": {
|
|
1021
|
+
class_type: "EmptyLatentImage",
|
|
1022
|
+
inputs: {
|
|
1023
|
+
width,
|
|
1024
|
+
height,
|
|
1025
|
+
batch_size: 1
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
"7": {
|
|
1029
|
+
class_type: "KSampler",
|
|
1030
|
+
inputs: {
|
|
1031
|
+
model: ["3", 0],
|
|
1032
|
+
positive: ["4", 0],
|
|
1033
|
+
negative: ["5", 0],
|
|
1034
|
+
latent_image: ["6", 0],
|
|
1035
|
+
seed,
|
|
1036
|
+
steps,
|
|
1037
|
+
cfg: 1,
|
|
1038
|
+
sampler_name: "euler_ancestral",
|
|
1039
|
+
scheduler: "normal",
|
|
1040
|
+
denoise: 1
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"8": {
|
|
1044
|
+
class_type: "VAELoader",
|
|
1045
|
+
inputs: {
|
|
1046
|
+
vae_name: "ae.safetensors"
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
"9": {
|
|
1050
|
+
class_type: "VAEDecode",
|
|
1051
|
+
inputs: {
|
|
1052
|
+
samples: ["7", 0],
|
|
1053
|
+
vae: ["8", 0]
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"10": {
|
|
1057
|
+
class_type: "UpscaleModelLoader",
|
|
1058
|
+
inputs: {
|
|
1059
|
+
model_name: upscaleModel
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
"11": {
|
|
1063
|
+
class_type: "ImageUpscaleWithModel",
|
|
1064
|
+
inputs: {
|
|
1065
|
+
upscale_model: ["10", 0],
|
|
1066
|
+
image: ["9", 0]
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
"12": {
|
|
1070
|
+
class_type: "SaveImage",
|
|
1071
|
+
inputs: {
|
|
1072
|
+
images: ["11", 0],
|
|
1073
|
+
filename_prefix: "genfeed-z-turbo-lora"
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
965
1078
|
|
|
966
1079
|
// src/index.ts
|
|
967
1080
|
import * as fs from "node:fs";
|
|
@@ -1078,6 +1191,8 @@ function searchWorkflowsByTag(tag) {
|
|
|
1078
1191
|
export {
|
|
1079
1192
|
ComfyUIClient,
|
|
1080
1193
|
ComfyUITemplateRunner,
|
|
1194
|
+
DEFAULT_RETRY_CONFIG,
|
|
1195
|
+
InMemoryNodeRegistry,
|
|
1081
1196
|
WORKFLOW_REGISTRY,
|
|
1082
1197
|
buildFlux2DevPrompt,
|
|
1083
1198
|
buildFlux2DevPulidLoraPrompt,
|
|
@@ -1086,6 +1201,7 @@ export {
|
|
|
1086
1201
|
buildFlux2KleinPrompt,
|
|
1087
1202
|
buildFluxDevPrompt,
|
|
1088
1203
|
buildPulidFluxPrompt,
|
|
1204
|
+
buildZImageTurboLoraPrompt,
|
|
1089
1205
|
buildZImageTurboPrompt,
|
|
1090
1206
|
getAllWorkflows,
|
|
1091
1207
|
getWorkflow,
|
package/metadata/catalog.json
CHANGED
|
@@ -71,6 +71,18 @@
|
|
|
71
71
|
"defaultModel": "nano-banana-pro",
|
|
72
72
|
"inputTypes": ["text"],
|
|
73
73
|
"outputTypes": ["video", "image"]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"slug": "lora-dataset-generator",
|
|
77
|
+
"title": "LoRA Dataset Generator",
|
|
78
|
+
"description": "Generate 20 varied training images from 3 reference identity photos across frontal, three-quarter, side profile, and variety shots",
|
|
79
|
+
"category": "image-generation",
|
|
80
|
+
"tags": ["lora", "dataset", "training", "portrait", "identity"],
|
|
81
|
+
"tier": "free",
|
|
82
|
+
"icon": "📷",
|
|
83
|
+
"defaultModel": "nano-banana-pro",
|
|
84
|
+
"inputTypes": ["image", "text"],
|
|
85
|
+
"outputTypes": ["image"]
|
|
74
86
|
}
|
|
75
87
|
]
|
|
76
88
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genfeedai/workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"sideEffects": false,
|
|
4
5
|
"license": "AGPL-3.0",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/genfeedai/
|
|
8
|
-
"directory": "
|
|
8
|
+
"url": "git+https://github.com/genfeedai/packages.git",
|
|
9
|
+
"directory": "workflows"
|
|
9
10
|
},
|
|
10
11
|
"publishConfig": {
|
|
11
12
|
"access": "public",
|
|
@@ -16,15 +17,20 @@
|
|
|
16
17
|
"exports": {
|
|
17
18
|
".": {
|
|
18
19
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/index.
|
|
20
|
-
"require": "./dist/index.
|
|
20
|
+
"import": "./dist/index.mjs",
|
|
21
|
+
"require": "./dist/index.js"
|
|
21
22
|
},
|
|
22
23
|
"./comfyui": {
|
|
23
24
|
"types": "./dist/comfyui/index.d.ts",
|
|
24
|
-
"import": "./dist/comfyui/index.
|
|
25
|
-
"require": "./dist/comfyui/index.
|
|
25
|
+
"import": "./dist/comfyui/index.mjs",
|
|
26
|
+
"require": "./dist/comfyui/index.js"
|
|
26
27
|
},
|
|
27
|
-
"./workflows/*": "./workflows/*"
|
|
28
|
+
"./workflows/*": "./workflows/*",
|
|
29
|
+
"./contracts": {
|
|
30
|
+
"types": "./dist/contracts/index.d.ts",
|
|
31
|
+
"import": "./dist/contracts/index.mjs",
|
|
32
|
+
"require": "./dist/contracts/index.js"
|
|
33
|
+
}
|
|
28
34
|
},
|
|
29
35
|
"files": [
|
|
30
36
|
"dist",
|
|
@@ -32,12 +38,13 @@
|
|
|
32
38
|
"metadata"
|
|
33
39
|
],
|
|
34
40
|
"scripts": {
|
|
35
|
-
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
36
|
-
"dev": "tsup src/index.ts --format esm,cjs --dts --watch",
|
|
41
|
+
"build": "tsup src/index.ts src/contracts/index.ts --format esm,cjs --dts --clean",
|
|
42
|
+
"dev": "tsup src/index.ts src/contracts/index.ts --format esm,cjs --dts --watch",
|
|
37
43
|
"prepublishOnly": "bun run build"
|
|
38
44
|
},
|
|
39
45
|
"devDependencies": {
|
|
40
|
-
"@genfeedai/types": "^0.
|
|
46
|
+
"@genfeedai/types": "^0.2.0",
|
|
47
|
+
"@types/node": "^25.2.3",
|
|
41
48
|
"tsup": "8.4.0",
|
|
42
49
|
"typescript": "5.9.3"
|
|
43
50
|
}
|