comfy-ts 2.22.0 → 2.24.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 (99) hide show
  1. package/dist/{ServeApp-DuxYdaZZ.js → ServeApp-fsHtW5zG.js} +51 -17
  2. package/dist/ServeApp-fsHtW5zG.js.map +1 -0
  3. package/dist/cli.js +5 -5
  4. package/dist/{exampleAssets-1NHndnNB.js → exampleAssets-DZynSkZm.js} +405 -39
  5. package/dist/exampleAssets-DZynSkZm.js.map +1 -0
  6. package/dist/{findDefinedWorkflow-CRsBTTJK.js → findDefinedWorkflow-qyqFea7q.js} +2 -2
  7. package/dist/{findDefinedWorkflow-CRsBTTJK.js.map → findDefinedWorkflow-qyqFea7q.js.map} +1 -1
  8. package/dist/index.cjs +428 -46
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +147 -1
  11. package/dist/index.d.ts +147 -1
  12. package/dist/index.js +428 -47
  13. package/dist/index.js.map +1 -1
  14. package/dist/{run-run-Y5ZI48vV.js → run-run-Cn2JzKlE.js} +5 -5
  15. package/dist/{run-run-Y5ZI48vV.js.map → run-run-Cn2JzKlE.js.map} +1 -1
  16. package/dist/{run-serve-CICU_wTL.js → run-serve-BhGegaCI.js} +4 -4
  17. package/dist/{run-serve-CICU_wTL.js.map → run-serve-BhGegaCI.js.map} +1 -1
  18. package/dist/{run-tui-CViJXsHL.js → run-tui-CrM4ijkH.js} +4 -4
  19. package/dist/{run-tui-CViJXsHL.js.map → run-tui-CrM4ijkH.js.map} +1 -1
  20. package/dist/{schemaDrift-CzjaIwZX.js → schemaDrift-BGYJZGMD.js} +18 -3
  21. package/dist/{schemaDrift-CzjaIwZX.js.map → schemaDrift-BGYJZGMD.js.map} +1 -1
  22. package/dist/serve-web.js +46 -43
  23. package/dist/web.d.ts +147 -1
  24. package/dist/web.js +428 -47
  25. package/dist/web.js.map +1 -1
  26. package/examples/README.md +1 -0
  27. package/examples/comfy-cloud/sdk.d.ts +102 -1
  28. package/examples/depth-explorer/models.ts +6 -56
  29. package/examples/depth-explorer/serve.ts +12 -133
  30. package/examples/depth-explorer/web/App.tsx +20 -91
  31. package/examples/depth-explorer/web/index.html +1 -0
  32. package/examples/depth-explorer/web/state.ts +26 -109
  33. package/examples/depth-explorer/web/styles.css +1 -286
  34. package/examples/explorer-kit/catalog.ts +80 -0
  35. package/examples/explorer-kit/server.ts +167 -0
  36. package/examples/explorer-kit/web/base.css +289 -0
  37. package/examples/explorer-kit/web/runs.ts +160 -0
  38. package/examples/explorer-kit/web/ui.tsx +125 -0
  39. package/examples/rvion/17-relight.cflow.ts +2 -1
  40. package/examples/rvion/18-world.cflow.ts +101 -0
  41. package/examples/rvion/19-flythrough.cflow.ts +312 -0
  42. package/examples/rvion/20-grow-splat.cflow.ts +88 -0
  43. package/examples/rvion/21-photo-to-model.cflow.ts +191 -0
  44. package/examples/rvion/flythroughChain.ts +171 -0
  45. package/examples/rvion/flythroughColmap.ts +157 -0
  46. package/examples/rvion/flythroughFuse.ts +199 -0
  47. package/examples/rvion/flythroughGuide.ts +300 -0
  48. package/examples/rvion/flythroughPalette.ts +310 -0
  49. package/examples/rvion/flythroughPath.ts +177 -0
  50. package/examples/rvion/flythroughSplat.ts +73 -0
  51. package/examples/rvion/grow-splat/align.ts +114 -0
  52. package/examples/rvion/grow-splat/grow.ts +198 -0
  53. package/examples/rvion/grow-splat/ply.ts +166 -0
  54. package/examples/rvion/grow-splat/raster.ts +207 -0
  55. package/examples/rvion/grow-splat/sharp.ts +45 -0
  56. package/examples/rvion/splatDataset.ts +80 -0
  57. package/examples/rvion/splatEval.ts +380 -0
  58. package/examples/upscale-explorer/models.ts +341 -0
  59. package/examples/upscale-explorer/serve.ts +19 -0
  60. package/examples/upscale-explorer/web/App.tsx +250 -0
  61. package/examples/upscale-explorer/web/compare.tsx +285 -0
  62. package/examples/upscale-explorer/web/index.html +15 -0
  63. package/examples/upscale-explorer/web/main.tsx +12 -0
  64. package/examples/upscale-explorer/web/state.ts +279 -0
  65. package/examples/upscale-explorer/web/styles.css +241 -0
  66. package/examples/upscale-explorer/web/tsconfig.json +16 -0
  67. package/examples/upscale-explorer/web/viewport.tsx +130 -0
  68. package/examples/world-explorer/serve.ts +171 -0
  69. package/examples/world-explorer/web/index.html +14 -0
  70. package/examples/world-explorer/web/main.tsx +200 -0
  71. package/examples/world-explorer/web/state.ts +212 -0
  72. package/examples/world-explorer/web/styles.css +131 -0
  73. package/examples/world-explorer/web/thumb.ts +21 -0
  74. package/examples/world-explorer/web/tsconfig.json +11 -0
  75. package/examples/world-explorer/world-state.ts +40 -0
  76. package/package.json +7 -8
  77. package/src/cli/serve/ServeApp.ts +27 -2
  78. package/src/cli/serve/resultHistory.ts +22 -4
  79. package/src/cli/serve/thumbs.ts +19 -8
  80. package/src/cli/serve/web/api.ts +4 -0
  81. package/src/cli/serve/web/components/Gallery.tsx +24 -1
  82. package/src/cli/serve/web/styles.ts +3 -0
  83. package/src/coreExports.ts +6 -0
  84. package/src/graph/ComfyNode.ts +12 -2
  85. package/src/host/ComfyHost.ts +159 -2
  86. package/src/host/ResilientWebsocket.ts +10 -0
  87. package/src/manager/script-update-manager.bun.ts +0 -7
  88. package/src/runner/ComfyExecution.ts +185 -23
  89. package/src/runner/ComfyWorkflow.ts +22 -0
  90. package/src/runner/ComfyWsApi.ts +3 -1
  91. package/src/runner/comfyOrgApiKey.ts +44 -0
  92. package/src/runner/historyReplay.ts +53 -0
  93. package/src/runner/outputs3d.ts +18 -0
  94. package/src/sdk-generator/ComfyUIObjectInfoTypes.ts +2 -0
  95. package/src/sdk-generator/comfyui-sdk-codegen.ts +7 -2
  96. package/src/state.ts +2 -0
  97. package/src/vars/DefinedWorkflow.ts +1 -0
  98. package/dist/ServeApp-DuxYdaZZ.js.map +0 -1
  99. package/dist/exampleAssets-1NHndnNB.js.map +0 -1
@@ -258,6 +258,20 @@ function mediaMime(filename) {
258
258
  return MIMES[extensionOf(filename)] ?? "application/octet-stream";
259
259
  }
260
260
  //#endregion
261
+ //#region src/runner/outputs3d.ts
262
+ /** ply and spz have no registered mime: the `x-` forms are what three.js and the splat viewers accept */
263
+ const MODEL_3D_MIMES = {
264
+ glb: "model/gltf-binary",
265
+ gltf: "model/gltf+json",
266
+ ply: "model/x-ply",
267
+ spz: "model/x-spz",
268
+ obj: "model/obj",
269
+ stl: "model/stl"
270
+ };
271
+ function model3dMime(filename) {
272
+ return MODEL_3D_MIMES[extensionOf(filename)] ?? "application/octet-stream";
273
+ }
274
+ //#endregion
261
275
  //#region src/utils/ansi.ts
262
276
  const codes = {
263
277
  bold: [1, 22],
@@ -2095,7 +2109,8 @@ var DefinedWorkflow = class {
2095
2109
  idMode: settings.idMode,
2096
2110
  log: settings.log,
2097
2111
  onProgress: settings.onProgress,
2098
- onPreview: settings.onPreview
2112
+ onPreview: settings.onPreview,
2113
+ comfyOrgApiKey: settings.comfyOrgApiKey
2099
2114
  });
2100
2115
  this.lastExecution = execution;
2101
2116
  return execution;
@@ -2205,6 +2220,6 @@ function summarizeDrift(d) {
2205
2220
  return parts.join(", ");
2206
2221
  }
2207
2222
  //#endregion
2208
- export { DEFAULT_MEDIA_EXTENSIONS as $, reloadLoraInfoCache as A, lmFileSize as B, getLoraTriggers as C, readLoraMirror as D, lorasMissingFromMirror as E, fetchLoraList as F, lmTags as G, lmModelName as H, fetchLoraPreviewBytes as I, loraKey as J, lmTrainedWords as K, lmBaseModel as L, fetchLoraCivitai as M, fetchLoraDescription as N, recordCivitaiMiss as O, fetchLoraExampleImages as P, stripAnsi as Q, lmCivitai as R, getLoraTriggerWords as S, loraMirrorEntries as T, lmNotes as U, lmFolder as V, lmSha256 as W, ansi as X, loraPreviewMapFrom as Y, colorsAvailable as Z, buildLoraMirror as _, DefinedWorkflow as a, importSharp as at, getLoraInfo as b, isLoraLanes as c, getComfyStorage as ct, isLoraStrength as d, logError as dt, MEDIA_KINDS as et, clearLoraKeywordOverride as f, logInfo as ft, setLoraKeyword as g, extractErrorMessage as gt, loraKeywordFromMirror as h, sha1HexOfString as ht, summarizeDrift as i, hashArrayBuffer as it, writeLoraMirror as j, refreshLoraInfoCacheIfChanged as k, isLorasInput as l, resolveComfyStorage as lt, isLoraKeywordFromMirror as m, statelessRegex as mt, diffSchemas as n, isVideoFilename as nt, LorasVar as o, isRecord as ot, getLoraKeyword as p, logSuccess as pt, loraBasename as q, driftChanged as r, mediaMime as rt, PromptVar as s, bang as st, MODEL_LISTS as t, extensionOf as tt, isPromptInput as u, isQuiet as ut, getLoraAddedAt as v, loraMatchesFilter as w, getLoraPreviewUrl as x, getLoraDisplayName as y, lmFilePath as z };
2223
+ export { MODEL_3D_MIMES as $, reloadLoraInfoCache as A, lmFileSize as B, getLoraTriggers as C, readLoraMirror as D, lorasMissingFromMirror as E, fetchLoraList as F, lmTags as G, lmModelName as H, fetchLoraPreviewBytes as I, loraKey as J, lmTrainedWords as K, lmBaseModel as L, fetchLoraCivitai as M, fetchLoraDescription as N, recordCivitaiMiss as O, fetchLoraExampleImages as P, stripAnsi as Q, lmCivitai as R, getLoraTriggerWords as S, loraMirrorEntries as T, lmNotes as U, lmFolder as V, lmSha256 as W, ansi as X, loraPreviewMapFrom as Y, colorsAvailable as Z, buildLoraMirror as _, sha1HexOfString as _t, DefinedWorkflow as a, mediaMime as at, getLoraInfo as b, isLoraLanes as c, isRecord as ct, isLoraStrength as d, resolveComfyStorage as dt, model3dMime as et, clearLoraKeywordOverride as f, isQuiet as ft, setLoraKeyword as g, statelessRegex as gt, loraKeywordFromMirror as h, logSuccess as ht, summarizeDrift as i, isVideoFilename as it, writeLoraMirror as j, refreshLoraInfoCacheIfChanged as k, isLorasInput as l, bang as lt, isLoraKeywordFromMirror as m, logInfo as mt, diffSchemas as n, MEDIA_KINDS as nt, LorasVar as o, hashArrayBuffer as ot, getLoraKeyword as p, logError as pt, loraBasename as q, driftChanged as r, extensionOf as rt, PromptVar as s, importSharp as st, MODEL_LISTS as t, DEFAULT_MEDIA_EXTENSIONS as tt, isPromptInput as u, getComfyStorage as ut, getLoraAddedAt as v, extractErrorMessage as vt, loraMatchesFilter as w, getLoraPreviewUrl as x, getLoraDisplayName as y, lmFilePath as z };
2209
2224
 
2210
- //# sourceMappingURL=schemaDrift-CzjaIwZX.js.map
2225
+ //# sourceMappingURL=schemaDrift-BGYJZGMD.js.map