comfy-ts 2.21.0 → 2.22.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 (85) hide show
  1. package/dist/{ServeApp-ByMobrWW.js → ServeApp-DuxYdaZZ.js} +142 -7
  2. package/dist/ServeApp-DuxYdaZZ.js.map +1 -0
  3. package/dist/cli.js +5 -5
  4. package/dist/{exampleAssets-B5sMqNia.js → exampleAssets-1NHndnNB.js} +4 -17
  5. package/dist/exampleAssets-1NHndnNB.js.map +1 -0
  6. package/dist/{findDefinedWorkflow-BNZgYIww.js → findDefinedWorkflow-CRsBTTJK.js} +2 -2
  7. package/dist/{findDefinedWorkflow-BNZgYIww.js.map → findDefinedWorkflow-CRsBTTJK.js.map} +1 -1
  8. package/dist/index.cjs +32 -1
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +71 -6
  11. package/dist/index.d.ts +71 -6
  12. package/dist/index.js +31 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/{run-run-CuBSygku.js → run-run-Y5ZI48vV.js} +5 -5
  15. package/dist/{run-run-CuBSygku.js.map → run-run-Y5ZI48vV.js.map} +1 -1
  16. package/dist/{run-serve-COk_G0Qz.js → run-serve-CICU_wTL.js} +4 -4
  17. package/dist/{run-serve-COk_G0Qz.js.map → run-serve-CICU_wTL.js.map} +1 -1
  18. package/dist/{run-tui-CB6i_x2y.js → run-tui-CViJXsHL.js} +4 -4
  19. package/dist/{run-tui-CB6i_x2y.js.map → run-tui-CViJXsHL.js.map} +1 -1
  20. package/dist/{schemaDrift-CHDVYlaj.js → schemaDrift-CzjaIwZX.js} +22 -2
  21. package/dist/schemaDrift-CzjaIwZX.js.map +1 -0
  22. package/dist/serve-web.js +204 -47
  23. package/dist/web.d.ts +71 -6
  24. package/dist/web.js +31 -2
  25. package/dist/web.js.map +1 -1
  26. package/examples/README.md +2 -0
  27. package/examples/depth-explorer/models.ts +722 -0
  28. package/examples/depth-explorer/serve.ts +140 -0
  29. package/examples/depth-explorer/thumbs/bae.webp +0 -0
  30. package/examples/depth-explorer/thumbs/da3-mono-large.webp +0 -0
  31. package/examples/depth-explorer/thumbs/dav1-vitl.webp +0 -0
  32. package/examples/depth-explorer/thumbs/dav2-vitl.webp +0 -0
  33. package/examples/depth-explorer/thumbs/dsine.webp +0 -0
  34. package/examples/depth-explorer/thumbs/iid-albedo.webp +0 -0
  35. package/examples/depth-explorer/thumbs/iid-metalness.webp +0 -0
  36. package/examples/depth-explorer/thumbs/iid-roughness.webp +0 -0
  37. package/examples/depth-explorer/thumbs/iid-shading.webp +0 -0
  38. package/examples/depth-explorer/thumbs/iid-specular.webp +0 -0
  39. package/examples/depth-explorer/thumbs/leres.webp +0 -0
  40. package/examples/depth-explorer/thumbs/lotus-depth.webp +0 -0
  41. package/examples/depth-explorer/thumbs/marigold2-albedo.webp +0 -0
  42. package/examples/depth-explorer/thumbs/marigold2-depth.webp +0 -0
  43. package/examples/depth-explorer/thumbs/marigold2-normal.webp +0 -0
  44. package/examples/depth-explorer/thumbs/metric3d-depth.webp +0 -0
  45. package/examples/depth-explorer/thumbs/metric3d-normal.webp +0 -0
  46. package/examples/depth-explorer/thumbs/midas-normal.webp +0 -0
  47. package/examples/depth-explorer/thumbs/midas.webp +0 -0
  48. package/examples/depth-explorer/thumbs/moge2-depth.webp +0 -0
  49. package/examples/depth-explorer/thumbs/moge2-normal.webp +0 -0
  50. package/examples/depth-explorer/thumbs/zoe-da.webp +0 -0
  51. package/examples/depth-explorer/thumbs/zoe.webp +0 -0
  52. package/examples/depth-explorer/web/App.tsx +457 -0
  53. package/examples/depth-explorer/web/gl.ts +202 -0
  54. package/examples/depth-explorer/web/index.html +14 -0
  55. package/examples/depth-explorer/web/main.tsx +19 -0
  56. package/examples/depth-explorer/web/pixels.ts +86 -0
  57. package/examples/depth-explorer/web/state.ts +329 -0
  58. package/examples/depth-explorer/web/styles.css +366 -0
  59. package/examples/depth-explorer/web/tsconfig.json +16 -0
  60. package/examples/rvion/17-relight.cflow.ts +110 -0
  61. package/package.json +3 -2
  62. package/src/cli/serve/ServeApp.ts +79 -4
  63. package/src/cli/serve/describeVar.ts +12 -1
  64. package/src/cli/serve/resultHistory.ts +6 -1
  65. package/src/cli/serve/thumbs.ts +66 -0
  66. package/src/cli/serve/web/api.ts +5 -1
  67. package/src/cli/serve/web/components/Gallery.tsx +2 -0
  68. package/src/cli/serve/web/components/controls/BasicControls.tsx +14 -17
  69. package/src/cli/serve/web/components/controls/MediaControl.tsx +62 -9
  70. package/src/cli/serve/web/components/controls/RichSelect.tsx +262 -0
  71. package/src/cli/serve/web/state/RunSt.poll.test.ts +4 -1
  72. package/src/cli/serve/web/state/choiceButtons.ts +26 -2
  73. package/src/cli/serve/web/styles.ts +39 -0
  74. package/src/cli/serve/web/widgets/OutputWidgets.tsx +19 -0
  75. package/src/cli/serve/web/widgets/RelightSt.ts +113 -0
  76. package/src/cli/serve/web/widgets/RelightWidget.tsx +305 -0
  77. package/src/cli/serve/web/widgets/relightGl.ts +305 -0
  78. package/src/cli/serve/web/widgets/widgetStyles.ts +19 -0
  79. package/src/coreExports.ts +9 -0
  80. package/src/vars/ComfyVars.ts +32 -2
  81. package/src/vars/DefinedWorkflow.ts +4 -0
  82. package/src/vars/outputWidgets.ts +47 -0
  83. package/dist/ServeApp-ByMobrWW.js.map +0 -1
  84. package/dist/exampleAssets-B5sMqNia.js.map +0 -1
  85. package/dist/schemaDrift-CHDVYlaj.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as readableStringify, c as writeHostFile, l as renderHttpBase, n as comfyTsPackageDir, r as ComfyTS, s as ComfySchema } from "./exampleAssets-B5sMqNia.js";
3
- import { D as readLoraMirror, F as fetchLoraList, H as lmModelName, K as lmTrainedWords, _ as buildLoraMirror, j as writeLoraMirror } from "./schemaDrift-CHDVYlaj.js";
2
+ import { a as readableStringify, c as renderHttpBase, n as comfyTsPackageDir, o as ComfySchema, r as ComfyTS, s as writeHostFile } from "./exampleAssets-1NHndnNB.js";
3
+ import { D as readLoraMirror, F as fetchLoraList, H as lmModelName, K as lmTrainedWords, _ as buildLoraMirror, j as writeLoraMirror } from "./schemaDrift-CzjaIwZX.js";
4
4
  import { spawn } from "node:child_process";
5
5
  import { constants, homedir } from "node:os";
6
6
  import { fileURLToPath } from "node:url";
@@ -554,14 +554,14 @@ async function main() {
554
554
  }
555
555
  armHopChild();
556
556
  if (cmd === "run") {
557
- const { runRun } = await import("./run-run-CuBSygku.js");
557
+ const { runRun } = await import("./run-run-Y5ZI48vV.js");
558
558
  return runRun(rest);
559
559
  }
560
560
  if (cmd === "serve") {
561
- const { runServe } = await import("./run-serve-COk_G0Qz.js");
561
+ const { runServe } = await import("./run-serve-CICU_wTL.js");
562
562
  return runServe(rest);
563
563
  }
564
- const { runTui } = await import("./run-tui-CB6i_x2y.js");
564
+ const { runTui } = await import("./run-tui-CViJXsHL.js");
565
565
  return runTui(rest);
566
566
  }
567
567
  console.log(HELP);
@@ -1,4 +1,4 @@
1
- import { X as ansi, a as DefinedWorkflow, at as isRecord$1, ct as resolveComfyStorage, dt as logInfo, ft as logSuccess, ht as extractErrorMessage, it as hashArrayBuffer, lt as isQuiet, mt as sha1HexOfString, n as diffSchemas, nt as isVideoFilename, ot as bang, pt as statelessRegex, rt as mediaMime, st as getComfyStorage, t as MODEL_LISTS, ut as logError } from "./schemaDrift-CHDVYlaj.js";
1
+ import { X as ansi, a as DefinedWorkflow, at as importSharp, ct as getComfyStorage, dt as logError, ft as logInfo, gt as extractErrorMessage, ht as sha1HexOfString, it as hashArrayBuffer, lt as resolveComfyStorage, mt as statelessRegex, n as diffSchemas, nt as isVideoFilename, ot as isRecord$1, pt as logSuccess, rt as mediaMime, st as bang, t as MODEL_LISTS, ut as isQuiet } from "./schemaDrift-CzjaIwZX.js";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { basename, dirname, join } from "pathe";
@@ -1003,7 +1003,7 @@ var ComfySchema = class {
1003
1003
  };
1004
1004
  //#endregion
1005
1005
  //#region package.json
1006
- var version = "2.21.0";
1006
+ var version = "2.22.0";
1007
1007
  //#endregion
1008
1008
  //#region src/litegraph/LiteGraphLinkID.ts
1009
1009
  const asLiteGraphLinkID = (id) => id;
@@ -2798,19 +2798,6 @@ const runTimestamp = (d) => {
2798
2798
  return `${d.getFullYear()}${pad(d.getMonth() + 1)}${pad(d.getDate())}-${pad(d.getHours())}${pad(d.getMinutes())}${pad(d.getSeconds())}`;
2799
2799
  };
2800
2800
  //#endregion
2801
- //#region src/utils/lazySharp.ts
2802
- let cached = null;
2803
- async function importSharp(reason) {
2804
- if (cached != null) return cached;
2805
- const specifier = "sharp";
2806
- try {
2807
- cached = (await import(specifier)).default;
2808
- return cached;
2809
- } catch (e) {
2810
- throw new Error(`sharp is unavailable — ${reason} is node-only (browser builds get raw bytes instead): ${extractErrorMessage(e)}`, { cause: e });
2811
- }
2812
- }
2813
- //#endregion
2814
2801
  //#region src/types/index.ts
2815
2802
  const asAbsolutePath = (path) => path;
2816
2803
  const resultSuccess = (value) => ({
@@ -6316,6 +6303,6 @@ function comfyTsPackageDir(moduleUrl = import.meta.url) {
6316
6303
  throw new Error(`[comfy-ts] no package.json found walking up from ${fileURLToPath(moduleUrl)}`);
6317
6304
  }
6318
6305
  //#endregion
6319
- export { readableStringify as a, writeHostFile as c, settingsPathFor as i, renderHttpBase as l, comfyTsPackageDir as n, importSharp as o, ComfyTS as r, ComfySchema as s, bundledExamplesDir as t };
6306
+ export { readableStringify as a, renderHttpBase as c, settingsPathFor as i, comfyTsPackageDir as n, ComfySchema as o, ComfyTS as r, writeHostFile as s, bundledExamplesDir as t };
6320
6307
 
6321
- //# sourceMappingURL=exampleAssets-B5sMqNia.js.map
6308
+ //# sourceMappingURL=exampleAssets-1NHndnNB.js.map