@aryacode/dsh-arya-image-gen 0.0.0-stage → 0.20.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.
Files changed (104) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +24 -0
  3. package/README.md +292 -2
  4. package/cordis.patch.yml +5 -0
  5. package/docs/assets/readme/canvas-edit.webp +0 -0
  6. package/docs/assets/readme/canvas-generate.webp +0 -0
  7. package/docs/assets/readme/chat-example.webp +0 -0
  8. package/docs/assets/readme/chat-generate.webp +0 -0
  9. package/docs/assets/readme/comfyui-workflows.webp +0 -0
  10. package/docs/assets/readme/gallery-management.webp +0 -0
  11. package/docs/assets/readme/hero-arya-wide.webp +0 -0
  12. package/docs/assets/readme/hero-arya.webp +0 -0
  13. package/docs/assets/readme/inspiration-arya.webp +0 -0
  14. package/docs/assets/readme/inspiration-library.webp +0 -0
  15. package/docs/assets/readme/install-arya.webp +0 -0
  16. package/docs/assets/readme/multi-model-compare.webp +0 -0
  17. package/docs/assets/readme/other-features.webp +0 -0
  18. package/docs/assets/readme/plugin-detail.webp +0 -0
  19. package/docs/assets/readme/plugins-entry.webp +0 -0
  20. package/docs/assets/readme/regenerating.webp +0 -0
  21. package/docs/assets/readme/revision-switcher.webp +0 -0
  22. package/docs/assets/readme/studio-arya.webp +0 -0
  23. package/docs/assets/readme/studio-workbench.webp +0 -0
  24. package/docs/assets/readme/workflow-overview-en.webp +0 -0
  25. package/docs/assets/readme/workflow-overview.webp +0 -0
  26. package/docs/workflows/arya-qwen-image-pack.zip +0 -0
  27. package/docs/workflows/qwen-image-compose.json +1 -0
  28. package/docs/workflows/qwen-image-create.json +142 -0
  29. package/docs/workflows/qwen-image-cutout.json +142 -0
  30. package/docs/workflows/qwen-image-edit.json +1 -0
  31. package/docs/workflows/qwen-image-remove-bg.json +1 -0
  32. package/lib/agent-toolset.js +51 -0
  33. package/lib/client.js +127081 -0
  34. package/lib/index.js +28598 -0
  35. package/lib/types/agent-preset/billion-context.d.ts +150 -0
  36. package/lib/types/agent-preset/definition.d.ts +75 -0
  37. package/lib/types/agent-preset/persona.d.ts +10 -0
  38. package/lib/types/agent-preset/register.d.ts +40 -0
  39. package/lib/types/agent-preset/toolset.d.ts +36 -0
  40. package/lib/types/baoyu-compose.d.ts +59 -0
  41. package/lib/types/canvas-asset-route.d.ts +12 -0
  42. package/lib/types/canvas-state-route.d.ts +37 -0
  43. package/lib/types/canvas-state.d.ts +80 -0
  44. package/lib/types/canvas-tools.d.ts +44 -0
  45. package/lib/types/client/browser-image-utils.d.ts +23 -0
  46. package/lib/types/client/conversation-image-revisions.d.ts +24 -0
  47. package/lib/types/client/conversation-regenerate.d.ts +8 -0
  48. package/lib/types/client/gallery-store.d.ts +137 -0
  49. package/lib/types/client/gallery-view.d.ts +255 -0
  50. package/lib/types/client/generation-activity.d.ts +62 -0
  51. package/lib/types/client/image-cache.d.ts +26 -0
  52. package/lib/types/client/image-ref.d.ts +31 -0
  53. package/lib/types/client/image-result-node.d.ts +81 -0
  54. package/lib/types/client/index.d.ts +113 -0
  55. package/lib/types/client/inspiration-catalog-cache.d.ts +4 -0
  56. package/lib/types/client/inspiration-image-cache.d.ts +3 -0
  57. package/lib/types/client/inspiration-style.d.ts +1 -0
  58. package/lib/types/client/inspiration-view.d.ts +9 -0
  59. package/lib/types/client/multi-model-compare.d.ts +20 -0
  60. package/lib/types/client/settings-state.d.ts +12 -0
  61. package/lib/types/client/settings-write.d.ts +4 -0
  62. package/lib/types/client/studio-style.d.ts +1 -0
  63. package/lib/types/client/studio-view.d.ts +48 -0
  64. package/lib/types/client/tl/canvas-selection.d.ts +13 -0
  65. package/lib/types/client/tl/canvas-sync.d.ts +30 -0
  66. package/lib/types/client/tl/conversation-landings.d.ts +48 -0
  67. package/lib/types/client/tl/css-supports-shim.d.ts +21 -0
  68. package/lib/types/client/tl/gallery-canvas-button.d.ts +10 -0
  69. package/lib/types/client/tl/gallery-image-transfer.d.ts +12 -0
  70. package/lib/types/client/tl/studio-tl-canvas.d.ts +16 -0
  71. package/lib/types/client/tl/tl-brand-theme.d.ts +10 -0
  72. package/lib/types/client/tl/tl-brand-tokens.d.ts +24 -0
  73. package/lib/types/client/tl/tl-canvas-bridge.d.ts +39 -0
  74. package/lib/types/client/tl/tl-css.d.ts +2 -0
  75. package/lib/types/client/tl/tl-theme-css.d.ts +17 -0
  76. package/lib/types/comfyui-progress.d.ts +78 -0
  77. package/lib/types/comfyui-server-route.d.ts +10 -0
  78. package/lib/types/comfyui-server.d.ts +61 -0
  79. package/lib/types/comfyui-workflow.d.ts +80 -0
  80. package/lib/types/comfyui.d.ts +52 -0
  81. package/lib/types/config.d.ts +87 -0
  82. package/lib/types/fetch-diagnostics.d.ts +10 -0
  83. package/lib/types/generated/default-workflows.d.ts +16 -0
  84. package/lib/types/image-route.d.ts +35 -0
  85. package/lib/types/image-tool-context.d.ts +3 -0
  86. package/lib/types/import-route.d.ts +16 -0
  87. package/lib/types/index.d.ts +16 -0
  88. package/lib/types/inspiration-route.d.ts +6 -0
  89. package/lib/types/inspiration.d.ts +92 -0
  90. package/lib/types/progress-route.d.ts +10 -0
  91. package/lib/types/redact.d.ts +2 -0
  92. package/lib/types/reference-image.d.ts +56 -0
  93. package/lib/types/reference-import.d.ts +66 -0
  94. package/lib/types/save-generated.d.ts +83 -0
  95. package/lib/types/settings-health.d.ts +6 -0
  96. package/lib/types/shared.d.ts +519 -0
  97. package/lib/types/studio-route.d.ts +15 -0
  98. package/lib/types/studio.d.ts +14 -0
  99. package/lib/types/validate-workflows.d.ts +48 -0
  100. package/lib/types/workspace-save.d.ts +103 -0
  101. package/package.json +143 -5
  102. package/skills/arya-image-references/SKILL.md +74 -0
  103. package/skills/arya-image-workflows/SKILL.md +75 -0
  104. package/skills/install-arya-image-gen/SKILL.md +28 -0
@@ -0,0 +1,142 @@
1
+ {
2
+ "1": {
3
+ "inputs": {
4
+ "unet_name": "qwen_image_2.1_turbo_int8_convrot.safetensors",
5
+ "weight_dtype": "default"
6
+ },
7
+ "class_type": "UNETLoader"
8
+ },
9
+ "2": {
10
+ "inputs": {
11
+ "clip_name": "qwen3vl_8b_w4a8.safetensors",
12
+ "type": "qwen_image",
13
+ "device": "default"
14
+ },
15
+ "class_type": "CLIPLoader"
16
+ },
17
+ "3": {
18
+ "inputs": {
19
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
20
+ },
21
+ "class_type": "VAELoader"
22
+ },
23
+ "5": {
24
+ "inputs": {
25
+ "model": [
26
+ "1",
27
+ 0
28
+ ],
29
+ "device": "cpu",
30
+ "dtype": "default"
31
+ },
32
+ "class_type": "QwenImage21Cache"
33
+ },
34
+ "14": {
35
+ "inputs": {
36
+ "clip": [
37
+ "2",
38
+ 0
39
+ ],
40
+ "vae": [
41
+ "3",
42
+ 0
43
+ ],
44
+ "prompt": "{{prompt}}",
45
+ "negative_prompt": "",
46
+ "resolution": "{{resolution}}"
47
+ },
48
+ "class_type": "TextEncodeQwenImage21"
49
+ },
50
+ "6": {
51
+ "inputs": {
52
+ "model": [
53
+ "5",
54
+ 0
55
+ ],
56
+ "positive": [
57
+ "14",
58
+ 0
59
+ ],
60
+ "negative": [
61
+ "14",
62
+ 1
63
+ ],
64
+ "cfg": 1.0
65
+ },
66
+ "class_type": "CFGGuider"
67
+ },
68
+ "7": {
69
+ "inputs": {
70
+ "noise_seed": "{{seed}}"
71
+ },
72
+ "class_type": "RandomNoise"
73
+ },
74
+ "8": {
75
+ "inputs": {
76
+ "sampler_name": "euler"
77
+ },
78
+ "class_type": "KSamplerSelect"
79
+ },
80
+ "9": {
81
+ "inputs": {
82
+ "sigmas": "1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"
83
+ },
84
+ "class_type": "ManualSigmas"
85
+ },
86
+ "11": {
87
+ "inputs": {
88
+ "noise": [
89
+ "7",
90
+ 0
91
+ ],
92
+ "guider": [
93
+ "6",
94
+ 0
95
+ ],
96
+ "sampler": [
97
+ "8",
98
+ 0
99
+ ],
100
+ "sigmas": [
101
+ "9",
102
+ 0
103
+ ],
104
+ "latent_image": [
105
+ "10",
106
+ 0
107
+ ]
108
+ },
109
+ "class_type": "SamplerCustomAdvanced"
110
+ },
111
+ "12": {
112
+ "inputs": {
113
+ "samples": [
114
+ "11",
115
+ 0
116
+ ],
117
+ "vae": [
118
+ "3",
119
+ 0
120
+ ]
121
+ },
122
+ "class_type": "VAEDecode"
123
+ },
124
+ "13": {
125
+ "inputs": {
126
+ "images": [
127
+ "12",
128
+ 0
129
+ ],
130
+ "filename_prefix": "AryaQwen21-create"
131
+ },
132
+ "class_type": "SaveImage"
133
+ },
134
+ "10": {
135
+ "inputs": {
136
+ "width": "{{width}}",
137
+ "height": "{{height}}",
138
+ "batch_size": 1
139
+ },
140
+ "class_type": "EmptyLatentImage"
141
+ }
142
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "1": {
3
+ "inputs": {
4
+ "unet_name": "qwen_image_2.1_turbo_int8_convrot.safetensors",
5
+ "weight_dtype": "default"
6
+ },
7
+ "class_type": "UNETLoader"
8
+ },
9
+ "2": {
10
+ "inputs": {
11
+ "clip_name": "qwen3vl_8b_w4a8.safetensors",
12
+ "type": "qwen_image",
13
+ "device": "default"
14
+ },
15
+ "class_type": "CLIPLoader"
16
+ },
17
+ "3": {
18
+ "inputs": {
19
+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"
20
+ },
21
+ "class_type": "VAELoader"
22
+ },
23
+ "5": {
24
+ "inputs": {
25
+ "model": [
26
+ "1",
27
+ 0
28
+ ],
29
+ "device": "cpu",
30
+ "dtype": "default"
31
+ },
32
+ "class_type": "QwenImage21Cache"
33
+ },
34
+ "14": {
35
+ "inputs": {
36
+ "clip": [
37
+ "2",
38
+ 0
39
+ ],
40
+ "vae": [
41
+ "3",
42
+ 0
43
+ ],
44
+ "prompt": "{{prompt}}",
45
+ "negative_prompt": "",
46
+ "resolution": 1024
47
+ },
48
+ "class_type": "TextEncodeQwenImage21"
49
+ },
50
+ "6": {
51
+ "inputs": {
52
+ "model": [
53
+ "5",
54
+ 0
55
+ ],
56
+ "positive": [
57
+ "14",
58
+ 0
59
+ ],
60
+ "negative": [
61
+ "14",
62
+ 1
63
+ ],
64
+ "cfg": 1.0
65
+ },
66
+ "class_type": "CFGGuider"
67
+ },
68
+ "7": {
69
+ "inputs": {
70
+ "noise_seed": "{{seed}}"
71
+ },
72
+ "class_type": "RandomNoise"
73
+ },
74
+ "8": {
75
+ "inputs": {
76
+ "sampler_name": "euler"
77
+ },
78
+ "class_type": "KSamplerSelect"
79
+ },
80
+ "9": {
81
+ "inputs": {
82
+ "sigmas": "1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"
83
+ },
84
+ "class_type": "ManualSigmas"
85
+ },
86
+ "11": {
87
+ "inputs": {
88
+ "noise": [
89
+ "7",
90
+ 0
91
+ ],
92
+ "guider": [
93
+ "6",
94
+ 0
95
+ ],
96
+ "sampler": [
97
+ "8",
98
+ 0
99
+ ],
100
+ "sigmas": [
101
+ "9",
102
+ 0
103
+ ],
104
+ "latent_image": [
105
+ "10",
106
+ 0
107
+ ]
108
+ },
109
+ "class_type": "SamplerCustomAdvanced"
110
+ },
111
+ "12": {
112
+ "inputs": {
113
+ "samples": [
114
+ "11",
115
+ 0
116
+ ],
117
+ "vae": [
118
+ "3",
119
+ 0
120
+ ]
121
+ },
122
+ "class_type": "VAEDecode"
123
+ },
124
+ "13": {
125
+ "inputs": {
126
+ "images": [
127
+ "12",
128
+ 0
129
+ ],
130
+ "filename_prefix": "AryaQwen21-cutout"
131
+ },
132
+ "class_type": "SaveImage"
133
+ },
134
+ "10": {
135
+ "inputs": {
136
+ "width": 1024,
137
+ "height": 1024,
138
+ "batch_size": 1
139
+ },
140
+ "class_type": "EmptyLatentImage"
141
+ }
142
+ }
@@ -0,0 +1 @@
1
+ {"1":{"inputs":{"unet_name":"qwen_image_2.1_turbo_int8_convrot.safetensors","weight_dtype":"default"},"class_type":"UNETLoader"},"2":{"inputs":{"clip_name":"qwen3vl_8b_w4a8.safetensors","type":"qwen_image","device":"default"},"class_type":"CLIPLoader"},"3":{"inputs":{"vae_name":"qwen_image_2.1_vae_bf16.safetensors"},"class_type":"VAELoader"},"5":{"inputs":{"model":["1",0],"device":"cpu","dtype":"default"},"class_type":"QwenImage21Cache"},"6":{"inputs":{"model":["5",0],"positive":["14",0],"negative":["14",1],"cfg":1},"class_type":"CFGGuider"},"7":{"inputs":{"noise_seed":"{{seed}}"},"class_type":"RandomNoise"},"8":{"inputs":{"sampler_name":"euler"},"class_type":"KSamplerSelect"},"9":{"inputs":{"sigmas":"1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"},"class_type":"ManualSigmas"},"11":{"inputs":{"noise":["7",0],"guider":["6",0],"sampler":["8",0],"sigmas":["9",0],"latent_image":["14",2]},"class_type":"SamplerCustomAdvanced"},"12":{"inputs":{"samples":["11",0],"vae":["3",0]},"class_type":"VAEDecode"},"13":{"inputs":{"images":["12",0],"filename_prefix":"AryaQwen21-edit"},"class_type":"SaveImage"},"14":{"inputs":{"clip":["2",0],"vae":["3",0],"prompt":"{{prompt}}","negative_prompt":"","resolution":0,"images.image_1":["20",0]},"class_type":"TextEncodeQwenImage21"},"20":{"inputs":{"image":"{{image}}"},"class_type":"LoadImage"}}
@@ -0,0 +1 @@
1
+ {"1":{"inputs":{"unet_name":"qwen_image_2.1_turbo_int8_convrot.safetensors","weight_dtype":"default"},"class_type":"UNETLoader"},"2":{"inputs":{"clip_name":"qwen3vl_8b_w4a8.safetensors","type":"qwen_image","device":"default"},"class_type":"CLIPLoader"},"3":{"inputs":{"vae_name":"qwen_image_2.1_vae_bf16.safetensors"},"class_type":"VAELoader"},"5":{"inputs":{"model":["1",0],"device":"cpu","dtype":"default"},"class_type":"QwenImage21Cache"},"6":{"inputs":{"model":["5",0],"positive":["14",0],"negative":["14",1],"cfg":1},"class_type":"CFGGuider"},"7":{"inputs":{"noise_seed":"{{seed}}"},"class_type":"RandomNoise"},"8":{"inputs":{"sampler_name":"euler"},"class_type":"KSamplerSelect"},"9":{"inputs":{"sigmas":"1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"},"class_type":"ManualSigmas"},"11":{"inputs":{"noise":["7",0],"guider":["6",0],"sampler":["8",0],"sigmas":["9",0],"latent_image":["14",2]},"class_type":"SamplerCustomAdvanced"},"12":{"inputs":{"samples":["11",0],"vae":["3",0]},"class_type":"VAEDecode"},"13":{"inputs":{"images":["12",0],"filename_prefix":"AryaQwen21-removebg"},"class_type":"SaveImage"},"14":{"inputs":{"clip":["2",0],"vae":["3",0],"prompt":"{{prompt}}","negative_prompt":"","resolution":0,"images.image_1":["20",0]},"class_type":"TextEncodeQwenImage21"},"20":{"inputs":{"image":"{{image}}"},"class_type":"LoadImage"}}
@@ -0,0 +1,51 @@
1
+ //#region lib/types/agent-preset/toolset.js
2
+ /** Unknown names `restrict()` reports, so the retry can drop exactly those. */
3
+ function unknownNamesFrom(error) {
4
+ return [...(error instanceof Error ? error.message : String(error)).matchAll(/"([^"]+)"/gu)].map((match) => match[1] ?? "").filter((name) => name.length > 0);
5
+ }
6
+ /**
7
+ * Apply the allow mask.
8
+ *
9
+ * @param ctx - the row's context, which must resolve to the agent scope.
10
+ * @param config - the row configuration from the preset definition.
11
+ */
12
+ function apply(ctx, config = {}) {
13
+ const requested = Array.isArray(config.allow) ? [...new Set(config.allow.filter((name) => typeof name === "string" && name.length > 0))] : [];
14
+ if (requested.length === 0) {
15
+ ctx.logger?.info?.("arya-image-toolset: no allow list configured; leaving the tool set untouched");
16
+ return;
17
+ }
18
+ let allow = requested;
19
+ for (let attempt = 0; attempt < 3; attempt++) try {
20
+ ctx.effect(() => ctx.tools.restrict({ allow }));
21
+ const dropped = requested.filter((name) => !allow.includes(name));
22
+ if (dropped.length > 0) ctx.logger?.info?.(`arya-image-toolset: not registered on this host, skipped: ${dropped.join(", ")}`);
23
+ return;
24
+ } catch (error) {
25
+ const unknown = unknownNamesFrom(error).filter((name) => allow.includes(name));
26
+ const kept = allow.filter((name) => !unknown.includes(name));
27
+ if (unknown.length === 0 || kept.length === 0 || kept.length === allow.length) {
28
+ ctx.logger?.warn?.(`arya-image-toolset: tool mask not applied: ${describe(error)}`);
29
+ return;
30
+ }
31
+ allow = kept;
32
+ }
33
+ ctx.logger?.warn?.("arya-image-toolset: tool mask not applied: the registry kept refusing names");
34
+ }
35
+ const inject = ["tools"];
36
+ apply.inject = inject;
37
+ /**
38
+ * Describe a thrown value for a log line.
39
+ *
40
+ * @param error - whatever was thrown.
41
+ * @returns a short message.
42
+ */
43
+ function describe(error) {
44
+ if (error !== null && typeof error === "object" && "message" in error) {
45
+ const message = error.message;
46
+ if (typeof message === "string") return message;
47
+ }
48
+ return String(error);
49
+ }
50
+ //#endregion
51
+ export { apply, inject };