comfy-ts 2.9.0 → 2.11.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 (55) hide show
  1. package/README.md +6 -4
  2. package/dist/{LogsSt-DFxzQfDc.js → LogsSt-qtFzOKpu.js} +2 -2
  3. package/dist/{LogsSt-DFxzQfDc.js.map → LogsSt-qtFzOKpu.js.map} +1 -1
  4. package/dist/cli.js +4 -4
  5. package/dist/index.cjs +102 -3
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +19 -0
  8. package/dist/index.d.ts +19 -0
  9. package/dist/index.js +102 -3
  10. package/dist/index.js.map +1 -1
  11. package/dist/{run-serve-_nrvJYyt.js → run-serve-BK7BA2dn.js} +91 -3
  12. package/dist/run-serve-BK7BA2dn.js.map +1 -0
  13. package/dist/{run-tui-BLEdTsOX.js → run-tui-CQyvMf0N.js} +36 -4
  14. package/dist/run-tui-CQyvMf0N.js.map +1 -0
  15. package/dist/{DefinedWorkflow-BatWaZO1.js → schemaDrift-DjjEtwfx.js} +176 -2
  16. package/dist/schemaDrift-DjjEtwfx.js.map +1 -0
  17. package/dist/serve-web.js +32 -16
  18. package/dist/{state-BbgJeCe6.js → state--wrz0BQc.js} +23 -5
  19. package/dist/state--wrz0BQc.js.map +1 -0
  20. package/dist/web.d.ts +19 -0
  21. package/dist/web.js +102 -3
  22. package/dist/web.js.map +1 -1
  23. package/examples/README.md +1 -0
  24. package/examples/comfy-cloud/capybara-i2v.cflow.ts +2 -0
  25. package/examples/comfy-cloud/ltx25-i2v.cflow.ts +152 -0
  26. package/examples/comfy-cloud/ltx25-t2v.cflow.ts +126 -0
  27. package/examples/comfy-cloud/minimax-music3-t2a.cflow.ts +95 -0
  28. package/examples/comfy-cloud/sdk.d.ts +30724 -24404
  29. package/examples/comfy-cloud/wan22-5b-t2v.cflow.ts +2 -0
  30. package/examples/comfy-cloud/wan22-i2v.cflow.ts +2 -0
  31. package/examples/comfy-cloud/wan22-t2v.cflow.ts +2 -0
  32. package/examples/rvion/07-local-llm-text-gen.cflow.ts +2 -2
  33. package/examples/rvion/08-qwen-image-21-t2i.cflow.ts +64 -0
  34. package/examples/rvion/09-qwen-image-21-edit.cflow.ts +83 -0
  35. package/package.json +4 -2
  36. package/src/cli/serve/ServeApp.ts +94 -0
  37. package/src/cli/serve/describeVar.ts +7 -0
  38. package/src/cli/serve/favicon.ts +3 -0
  39. package/src/cli/serve/web/api.ts +12 -0
  40. package/src/cli/serve/web/components/VarsForm.tsx +18 -7
  41. package/src/cli/serve/web/components/controls/LorasControl.tsx +102 -6
  42. package/src/cli/serve/web/state/WebSt.ts +79 -0
  43. package/src/cli/serve/web/state/loraSort.ts +39 -0
  44. package/src/cli/serve/web/styles.ts +15 -0
  45. package/src/cli/tui/components/Header.tsx +2 -0
  46. package/src/cli/tui/state/HostSt.ts +34 -0
  47. package/src/graph/ComfyNode.ts +19 -3
  48. package/src/host/ComfyHost.ts +15 -0
  49. package/src/host/loraInfoCache.ts +64 -0
  50. package/src/host/loraManagerApi.ts +27 -0
  51. package/src/host/schemaDrift.ts +87 -0
  52. package/dist/DefinedWorkflow-BatWaZO1.js.map +0 -1
  53. package/dist/run-serve-_nrvJYyt.js.map +0 -1
  54. package/dist/run-tui-BLEdTsOX.js.map +0 -1
  55. package/dist/state-BbgJeCe6.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { G as resolveComfyStorage, H as isRecord$1, J as logInfo, K as isQuiet, Q as sha1HexOfString, R as ansi, U as bang, V as extractErrorMessage, W as getComfyStorage, X as statelessRegex, Y as logSuccess, Z as sha1Hex, q as logError, t as DefinedWorkflow } from "./DefinedWorkflow-BatWaZO1.js";
1
+ import { $ as resolveComfyStorage, K as ansi, Q as getComfyStorage, X as isRecord$1, Y as extractErrorMessage, Z as bang, a as DefinedWorkflow, at as sha1Hex, et as isQuiet, it as statelessRegex, n as diffSchemas, nt as logInfo, ot as sha1HexOfString, rt as logSuccess, t as MODEL_LISTS, tt as logError } from "./schemaDrift-DjjEtwfx.js";
2
2
  import { basename, join } from "pathe";
3
3
  import { scope, type } from "arktype";
4
4
  import { nanoid } from "nanoid";
@@ -850,7 +850,7 @@ var ComfySchema = class {
850
850
  };
851
851
  //#endregion
852
852
  //#region package.json
853
- var version = "2.9.0";
853
+ var version = "2.11.0";
854
854
  //#endregion
855
855
  //#region src/litegraph/LiteGraphLinkID.ts
856
856
  const asLiteGraphLinkID = (id) => id;
@@ -2078,8 +2078,15 @@ var ComfyNode = class ComfyNode {
2078
2078
  }
2079
2079
  _getExpectedTypeForField(name) {
2080
2080
  const input = this.$schema.inputs.find((i) => i.nameInComfy === name);
2081
- if (input == null) throw new Error("🔴 input not found asdf");
2082
- return input.typeName;
2081
+ if (input != null) return input.typeName;
2082
+ const dot = name.indexOf(".");
2083
+ const decl = dot > 0 ? this.$schema.inputs.find((i) => i.nameInComfy === name.slice(0, dot)) : void 0;
2084
+ if (decl != null) {
2085
+ const kind = classifySchemaInput(decl);
2086
+ const slotType = containerInstanceSlotType(decl.opts);
2087
+ if (kind.kind === "dynamic-container" && kind.instanceNames.includes(name.slice(dot + 1)) && slotType != null) return slotType;
2088
+ }
2089
+ throw new Error(`🔴 no input "${name}" on ${this.$schema.nodeKey}: cannot tell which output of the linked node to use`);
2083
2090
  }
2084
2091
  _getOutputForTypeOrCrash(type) {
2085
2092
  const i = this.$schema.outputs.find((i) => i.typeName === type);
@@ -4028,6 +4035,17 @@ var ComfyHost = class {
4028
4035
  }, { apiPrefix: false });
4029
4036
  if (!res.ok) throw new Error(`PATCH /internal/logs/subscribe failed: ${res.status}`);
4030
4037
  };
4038
+ this.checkSchemaDrift = async (p) => {
4039
+ const loaded = this.schema.data.spec;
4040
+ const live = {};
4041
+ if (p.full) Object.assign(live, await this.fetchJSON_("/object_info"));
4042
+ else for (const m of MODEL_LISTS) if (loaded[m.node] != null) Object.assign(live, await this.fetchJSON_(`/object_info/${m.node}`));
4043
+ return diffSchemas({
4044
+ loaded,
4045
+ live,
4046
+ full: p.full
4047
+ });
4048
+ };
4031
4049
  this.fetchJSON_ = async (route) => {
4032
4050
  const base = this.getServerHostHTTP();
4033
4051
  const res = await this.fetch(route);
@@ -4998,4 +5016,4 @@ var ComfyTS = class ComfyTS {
4998
5016
  //#endregion
4999
5017
  export { ComfySchema as a, importSharp as i, settingsPathFor as n, readableStringify as r, ComfyTS as t };
5000
5018
 
5001
- //# sourceMappingURL=state-BbgJeCe6.js.map
5019
+ //# sourceMappingURL=state--wrz0BQc.js.map