comfy-ts 2.14.0 → 2.16.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 (75) hide show
  1. package/README.md +1 -0
  2. package/dist/{LogsSt-CUeo843w.js → LogsSt-Ct7Le0S_.js} +2 -2
  3. package/dist/{LogsSt-CUeo843w.js.map → LogsSt-Ct7Le0S_.js.map} +1 -1
  4. package/dist/cli.js +4 -4
  5. package/dist/index.cjs +268 -55
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +176 -26
  8. package/dist/index.d.ts +176 -26
  9. package/dist/index.js +262 -56
  10. package/dist/index.js.map +1 -1
  11. package/dist/{run-serve-DUqcn0h3.js → run-serve-C78hD7t9.js} +119 -40
  12. package/dist/run-serve-C78hD7t9.js.map +1 -0
  13. package/dist/{run-tui-D-LaSqgB.js → run-tui-nPETFRmk.js} +15 -9
  14. package/dist/run-tui-nPETFRmk.js.map +1 -0
  15. package/dist/{schemaDrift-E95iTF7E.js → schemaDrift-wb5XkrHV.js} +218 -27
  16. package/dist/schemaDrift-wb5XkrHV.js.map +1 -0
  17. package/dist/serve-web.js +64 -50
  18. package/dist/{state-BytbdZ8s.js → state-BMW57_M0.js} +45 -35
  19. package/dist/state-BMW57_M0.js.map +1 -0
  20. package/dist/web.d.ts +173 -26
  21. package/dist/web.js +251 -53
  22. package/dist/web.js.map +1 -1
  23. package/examples/README.md +1 -0
  24. package/examples/media/README.md +9 -0
  25. package/examples/media/sine_440hz_3s.flac +0 -0
  26. package/examples/media/testsrc_256x256_3s.mp4 +0 -0
  27. package/examples/media/voice_en_6s.flac +0 -0
  28. package/examples/rvion/04-krea2-turbo-t2i.cflow.ts +9 -1
  29. package/examples/rvion/10-anima-t2i.cflow.ts +8 -1
  30. package/examples/rvion/14-video-soundtrack.cflow.ts +47 -0
  31. package/examples/rvion/15-tts-voice-clone.cflow.ts +111 -0
  32. package/guide-for-agents.md +3 -1
  33. package/package.json +2 -2
  34. package/src/cli/serve/ServeApp.ts +115 -32
  35. package/src/cli/serve/applyVarPayload.ts +5 -3
  36. package/src/cli/serve/describeVar.ts +5 -3
  37. package/src/cli/serve/resultHistory.ts +22 -6
  38. package/src/cli/serve/run-serve.ts +4 -1
  39. package/src/cli/serve/web/api.ts +4 -0
  40. package/src/cli/serve/web/components/DraftTabs.tsx +2 -1
  41. package/src/cli/serve/web/components/Gallery.tsx +86 -5
  42. package/src/cli/serve/web/components/HistoryPicker.tsx +5 -3
  43. package/src/cli/serve/web/components/MenuButton.tsx +2 -4
  44. package/src/cli/serve/web/components/Omnibox.tsx +2 -1
  45. package/src/cli/serve/web/components/PromptEnhancer.tsx +4 -3
  46. package/src/cli/serve/web/components/ShortcutsModal.tsx +2 -1
  47. package/src/cli/serve/web/components/SideMenu.tsx +2 -1
  48. package/src/cli/serve/web/components/VarsForm.tsx +5 -3
  49. package/src/cli/serve/web/components/controls/LorasControl.tsx +4 -3
  50. package/src/cli/serve/web/components/controls/MediaControl.tsx +111 -0
  51. package/src/cli/serve/web/components/controls/PresetPicker.tsx +2 -1
  52. package/src/cli/serve/web/components/controls/PromptControl.tsx +2 -1
  53. package/src/cli/serve/web/components/controls/SizeControl.tsx +2 -1
  54. package/src/cli/serve/web/state/FormSt.ts +70 -2
  55. package/src/cli/serve/web/state/escape.ts +16 -0
  56. package/src/cli/serve/web/state/host.ts +2 -0
  57. package/src/cli/serve/web/state/mediaDrop.ts +76 -0
  58. package/src/cli/serve/web/styles.ts +16 -2
  59. package/src/cli/tui/imagePicker/ImagePickerOverlay.tsx +4 -1
  60. package/src/cli/tui/imagePicker/ImagePickerSt.ts +15 -6
  61. package/src/cli/tui/state/TuiSt.ts +1 -1
  62. package/src/coreExports.ts +20 -1
  63. package/src/exampleAssets.ts +13 -3
  64. package/src/host/ComfyUploader.ts +34 -27
  65. package/src/index.ts +1 -1
  66. package/src/runner/ComfyExecution.ts +38 -20
  67. package/src/runner/ComfyWsApi.ts +3 -0
  68. package/src/runner/mediaKinds.ts +51 -0
  69. package/src/vars/ComfyVars.ts +178 -34
  70. package/src/vars/DefinedWorkflow.ts +35 -2
  71. package/dist/run-serve-DUqcn0h3.js.map +0 -1
  72. package/dist/run-tui-D-LaSqgB.js.map +0 -1
  73. package/dist/schemaDrift-E95iTF7E.js.map +0 -1
  74. package/dist/state-BytbdZ8s.js.map +0 -1
  75. package/src/cli/serve/web/components/controls/ImageControl.tsx +0 -72
package/dist/index.d.ts CHANGED
@@ -11946,6 +11946,16 @@ declare const types$1: import("arktype").Module<{
11946
11946
  subfolder: string;
11947
11947
  type: string;
11948
11948
  }[] | undefined;
11949
+ video?: {
11950
+ filename: string;
11951
+ subfolder: string;
11952
+ type: string;
11953
+ }[] | undefined;
11954
+ gifs?: {
11955
+ filename: string;
11956
+ subfolder: string;
11957
+ type: string;
11958
+ }[] | undefined;
11949
11959
  text?: unknown[] | undefined;
11950
11960
  };
11951
11961
  prompt_id: PromptID;
@@ -12027,6 +12037,16 @@ declare const types$1: import("arktype").Module<{
12027
12037
  subfolder: string;
12028
12038
  type: string;
12029
12039
  }[] | undefined;
12040
+ video?: {
12041
+ filename: string;
12042
+ subfolder: string;
12043
+ type: string;
12044
+ }[] | undefined;
12045
+ gifs?: {
12046
+ filename: string;
12047
+ subfolder: string;
12048
+ type: string;
12049
+ }[] | undefined;
12030
12050
  text?: unknown[] | undefined;
12031
12051
  };
12032
12052
  prompt_id: PromptID;
@@ -12094,6 +12114,16 @@ declare const types$1: import("arktype").Module<{
12094
12114
  subfolder: string;
12095
12115
  type: string;
12096
12116
  }[] | undefined;
12117
+ video?: {
12118
+ filename: string;
12119
+ subfolder: string;
12120
+ type: string;
12121
+ }[] | undefined;
12122
+ gifs?: {
12123
+ filename: string;
12124
+ subfolder: string;
12125
+ type: string;
12126
+ }[] | undefined;
12097
12127
  text?: unknown[] | undefined;
12098
12128
  };
12099
12129
  prompt_id: PromptID;
@@ -12200,6 +12230,16 @@ declare const types$1: import("arktype").Module<{
12200
12230
  subfolder: string;
12201
12231
  type: string;
12202
12232
  }[] | undefined;
12233
+ video?: {
12234
+ filename: string;
12235
+ subfolder: string;
12236
+ type: string;
12237
+ }[] | undefined;
12238
+ gifs?: {
12239
+ filename: string;
12240
+ subfolder: string;
12241
+ type: string;
12242
+ }[] | undefined;
12203
12243
  text?: unknown[] | undefined;
12204
12244
  };
12205
12245
  prompt_id: PromptID;
@@ -12695,6 +12735,9 @@ type ComfyAudioOutput = {
12695
12735
  bytes: Uint8Array;
12696
12736
  absPath: AbsolutePath | null;
12697
12737
  };
12738
+ /** one video file an output node published (SaveVideo, SaveWEBM, VHS_VideoCombine), same
12739
+ * shape and same retrieval as an audio file */
12740
+ type ComfyVideoOutput = ComfyAudioOutput;
12698
12741
  /** one text output as an output node published it (`nodeKey` is null when the node left the snapshot) */
12699
12742
  type ComfyTextOutput = {
12700
12743
  nodeId: ComfyNodeId;
@@ -12766,7 +12809,14 @@ declare class ComfyExecution {
12766
12809
  }[];
12767
12810
  /** audio files retrieved for this execution, in arrival order (final once `done` resolves) */
12768
12811
  audios: ComfyAudioOutput[];
12769
- private retrieveAudio;
12812
+ /** video retrievals that failed (their files are missing from `videos`) */
12813
+ videoErrors: {
12814
+ video: ComfyImageInfo;
12815
+ error: unknown;
12816
+ }[];
12817
+ /** video files retrieved for this execution, in arrival order (final once `done` resolves) */
12818
+ videos: ComfyVideoOutput[];
12819
+ private retrieveFile;
12770
12820
  /** image retrievals that failed (their images are missing from `images`);
12771
12821
  * `image` is null for SaveImageWebsocket frames (no server-side file info exists) */
12772
12822
  imageErrors: {
@@ -15885,12 +15935,29 @@ type ComfyUploadImageResult = {
15885
15935
  declare class ComfyUploader {
15886
15936
  host: ComfyHost;
15887
15937
  constructor(host: ComfyHost);
15888
- /** upload a blob */
15938
+ /** names this process already uploaded to this host: a LoadAudio or LoadVideo list is not
15939
+ * reloaded after an upload, so without it every run re-sent the same file */
15940
+ private uploaded;
15941
+ /** upload an image (hash-named, deduped against the host's LoadImage list) */
15889
15942
  uploadImage: (img: MediaImage, p: {
15890
15943
  type?: Maybe<'input' | 'temp' | 'output'>;
15891
15944
  override?: Maybe<boolean>;
15892
15945
  subfolder?: string;
15893
15946
  }) => Promise<ComfyImageName>;
15947
+ /**
15948
+ * THE upload path: any file a loader node reads from the host's input folder. ComfyUI routes
15949
+ * audio and video through `/upload/image` too. `slot` is the loader input whose value list
15950
+ * says the file is already there (`LoadImage.image`, `LoadAudio.audio`, `LoadVideo.file`)
15951
+ */
15952
+ uploadInput: (p: {
15953
+ blob: Blob;
15954
+ /** the name the file should get on the host, hash-derived by callers so reruns dedupe */
15955
+ name: string;
15956
+ slot: string;
15957
+ type?: Maybe<'input' | 'temp' | 'output'>;
15958
+ override?: Maybe<boolean>;
15959
+ subfolder?: string;
15960
+ }) => Promise<string>;
15894
15961
  }
15895
15962
  //#endregion
15896
15963
  //#region src/host/hostUrl.d.ts
@@ -16078,6 +16145,9 @@ declare function toPresetList(spec: VarPresetSpec | undefined): VarPreset[];
16078
16145
  /** which preset the value still IS, or null once it was hand-edited (trailing whitespace ignored) */
16079
16146
  declare function activePresetLabel(presets: readonly VarPreset[], value: string): string | null;
16080
16147
  //#endregion
16148
+ //#region src/runner/mediaKinds.d.ts
16149
+ type MediaKind = 'image' | 'audio' | 'video';
16150
+ //#endregion
16081
16151
  //#region src/vars/ComfyVars.d.ts
16082
16152
  /**
16083
16153
  * the var's CLASS, and the only safe way to discriminate one: `instanceof` compares class
@@ -16087,7 +16157,7 @@ declare function activePresetLabel(presets: readonly VarPreset[], value: string)
16087
16157
  * in a consumer app: "var 'prompt' has unsupported kind 'text'", for EVERY kind). A string tag
16088
16158
  * crosses bundles; a class identity does not.
16089
16159
  */
16090
- type VarKind = 'text' | 'prompt' | 'int' | 'float' | 'seed' | 'toggle' | 'choice' | 'loras' | 'size' | 'image';
16160
+ type VarKind = 'text' | 'prompt' | 'int' | 'float' | 'seed' | 'toggle' | 'choice' | 'loras' | 'size' | MediaKind;
16091
16161
  /**
16092
16162
  * full base: T is what's STORED/edited, Out what the GRAPH consumes at build
16093
16163
  * time. They usually coincide — extend `ComfyVar<T>` for that. PromptVar is
@@ -16315,20 +16385,33 @@ declare class ToggleVar extends ComfyVar<boolean> {
16315
16385
  }
16316
16386
  /** how many options a choice holds: exactly one (the default), one or none, or any number */
16317
16387
  type ChoiceSelect = 'one' | 'zero-or-one' | 'many';
16388
+ /** where a host-bound choice reads its options: one loader input of the host's live schema,
16389
+ * optionally narrowed (`v.model`) */
16390
+ type HostSlotSource = {
16391
+ slot: string;
16392
+ filter?: RegExp;
16393
+ };
16318
16394
  declare class ChoiceVar<T extends string> extends ComfyVar<T> {
16319
- readonly choices: readonly T[];
16320
16395
  readonly kind: 'choice';
16321
16396
  readonly select: 'one';
16322
- constructor(choices: readonly T[], defaultValue: T, label?: string);
16397
+ private list;
16398
+ constructor(choices: readonly T[] | HostSlotSource, defaultValue: T, label?: string);
16399
+ get choices(): readonly T[];
16400
+ /** set for `v.model`: the loader input this choice lists */
16401
+ get hostSlot(): HostSlotSource | null;
16402
+ bindHost(host: LorasHost): void;
16323
16403
  next(delta?: number): this;
16324
16404
  parse(raw: string): boolean;
16325
16405
  }
16326
16406
  /** one option or none: `null` is "nothing picked", clicking the lit option clears it */
16327
16407
  declare class OptionalChoiceVar<T extends string> extends ComfyVar<T | null> {
16328
- readonly choices: readonly T[];
16329
16408
  readonly kind: 'choice';
16330
16409
  readonly select: 'zero-or-one';
16331
- constructor(choices: readonly T[], defaultValue: T | null, label?: string);
16410
+ private list;
16411
+ constructor(choices: readonly T[] | HostSlotSource, defaultValue: T | null, label?: string);
16412
+ get choices(): readonly T[];
16413
+ get hostSlot(): HostSlotSource | null;
16414
+ bindHost(host: LorasHost): void;
16332
16415
  /** pick `c`, or clear it when it is already the one picked */
16333
16416
  toggle(c: T): this;
16334
16417
  /** the TUI text form: a choice, or an empty line for none */
@@ -16365,6 +16448,22 @@ declare function choice<const T extends string>(choices: readonly T[], defaultVa
16365
16448
  }): ChoiceVar<T>;
16366
16449
  declare function choice<const T extends string>(choices: readonly T[], defaultValue: T | null, opts: ChoiceOpts<'zero-or-one'>): OptionalChoiceVar<T>;
16367
16450
  declare function choice<const T extends string>(choices: readonly T[], defaultValue: readonly T[], opts: ChoiceOpts<'many'>): MultiChoiceVar<T>;
16451
+ type ModelVarOpts<T extends string> = {
16452
+ /** narrows the host's list: `/krea/i` */
16453
+ filter?: RegExp;
16454
+ label?: string;
16455
+ /** a file name, or null for "the workflow decides" (the build then reads null) */
16456
+ default: T | null;
16457
+ };
16458
+ /** a choice over the host's LIVE file list for one loader input (`'UNETLoader.unet_name'`),
16459
+ * resolved at define time and rebound by serve's refresh-schema: a downloaded model is picked
16460
+ * in the draft, never written into the workflow file */
16461
+ declare function model<T extends string>(slot: string, opts: ModelVarOpts<T> & {
16462
+ default: T;
16463
+ }): ChoiceVar<T>;
16464
+ declare function model<T extends string>(slot: string, opts: ModelVarOpts<T> & {
16465
+ default: null;
16466
+ }): OptionalChoiceVar<T>;
16368
16467
  type ActiveLora<T extends string> = {
16369
16468
  lora_name: T;
16370
16469
  strength_model: number;
@@ -16379,6 +16478,7 @@ type LorasHost = {
16379
16478
  };
16380
16479
  schema: {
16381
16480
  getLoras(filter?: RegExp): string[];
16481
+ stringValues(slot: string): string[];
16382
16482
  };
16383
16483
  };
16384
16484
  /**
@@ -16477,35 +16577,44 @@ declare class SizeVar extends ComfyVar<SizeValue> {
16477
16577
  parse(raw: string): boolean;
16478
16578
  display(): string;
16479
16579
  }
16480
- type ImageVarOpts = {
16580
+ type MediaVarOpts = {
16481
16581
  /** where the TUI picker starts browsing AND what relative values resolve against (absPath) */
16482
16582
  folder?: string;
16483
16583
  /** picker listing filter, lowercase without dots; never affects the value. NOT a security
16484
- * boundary: `comfy-ts serve` keeps its own floor of image types it will read off the disk
16584
+ * boundary: `comfy-ts serve` keeps its own floor of media types it will read off the disk
16485
16585
  * and upload, which this list may NARROW but never widen (emptying it changes the picker,
16486
16586
  * not what the api accepts) */
16487
16587
  extensions?: readonly string[];
16488
16588
  label?: string;
16489
16589
  };
16590
+ type ImageVarOpts = MediaVarOpts;
16591
+ type AudioVarOpts = MediaVarOpts;
16592
+ type VideoVarOpts = MediaVarOpts;
16490
16593
  declare const DEFAULT_IMAGE_EXTENSIONS: readonly string[];
16491
- /** empty image var consumed at build time — typed so drivers surface it apart from real crashes */
16492
- declare class ImageVarEmptyError extends Error {
16594
+ declare const DEFAULT_AUDIO_EXTENSIONS: readonly string[];
16595
+ declare const DEFAULT_VIDEO_EXTENSIONS: readonly string[];
16596
+ /** empty media var consumed at build time — typed so drivers surface it apart from real crashes */
16597
+ declare class MediaVarEmptyError extends Error {
16493
16598
  readonly varName: string;
16599
+ readonly media: MediaKind;
16494
16600
  /** name, not instanceof: the cli bundle and dist/index.js each define this class */
16495
- readonly name = "ImageVarEmptyError";
16496
- constructor(varName: string);
16601
+ readonly name: string;
16602
+ constructor(varName: string, media?: MediaKind);
16497
16603
  }
16604
+ /** the image-only name this error had first; the same class */
16605
+ declare const ImageVarEmptyError: typeof MediaVarEmptyError;
16606
+ type ImageVarEmptyError = MediaVarEmptyError;
16498
16607
  /**
16499
- * a local image path. The VALUE is a PLAIN PATH STRING — text-encodable,
16608
+ * a local media file path. The VALUE is a PLAIN PATH STRING — text-encodable,
16500
16609
  * drafts persist it verbatim (toJSON = the string), hand-editable in the
16501
- * draft json. Empty = unset: outValue()/absPath() throw ImageVarEmptyError,
16502
- * so a build never runs on a silent placeholder. The TUI opens the image
16503
- * picker overlay for kind 'image'.
16504
- */
16505
- declare class ImageVar extends ComfyVar<string> {
16506
- opts: ImageVarOpts;
16507
- readonly kind: 'image';
16508
- constructor(defaultValue: string, opts?: ImageVarOpts);
16610
+ * draft json. Empty = unset: outValue()/absPath() throw MediaVarEmptyError,
16611
+ * so a build never runs on a silent placeholder. The TUI opens the file
16612
+ * picker overlay for every media kind.
16613
+ */
16614
+ declare abstract class MediaVar extends ComfyVar<string> {
16615
+ opts: MediaVarOpts;
16616
+ abstract readonly kind: MediaKind;
16617
+ constructor(defaultValue: string, opts?: MediaVarOpts);
16509
16618
  /** what the picker lists (lowercase, no dots) */
16510
16619
  get extensions(): readonly string[];
16511
16620
  set(value: string): this;
@@ -16517,8 +16626,26 @@ declare class ImageVar extends ComfyVar<string> {
16517
16626
  /** empty = unset: the build fails LOUD here (varValues calls outValue) */
16518
16627
  outValue(): string;
16519
16628
  display(): string;
16629
+ /** upload the file hash-named (reruns dedupe) and add this medium's loader node. A dry
16630
+ * build names the file by its hash and uploads nothing */
16631
+ protected loadVia(wf: ComfyWorkflow<string>): Promise<unknown>;
16632
+ }
16633
+ /** a local image path, loaded through LoadImage */
16634
+ declare class ImageVar extends MediaVar {
16635
+ readonly kind: 'image';
16636
+ loadInWorkflow<WID extends string>(wf: ComfyWorkflow<WID>): Promise<NodeOf<WID, 'LoadImage'>>;
16520
16637
  }
16521
- /** the var constructors: v.text / v.prompt / v.int / v.float / v.seed / v.toggle / v.choice / v.loras / v.size / v.image */
16638
+ /** a local audio path, loaded through LoadAudio */
16639
+ declare class AudioVar extends MediaVar {
16640
+ readonly kind: 'audio';
16641
+ loadInWorkflow<WID extends string>(wf: ComfyWorkflow<WID>): Promise<NodeOf<WID, 'LoadAudio'>>;
16642
+ }
16643
+ /** a local video path, loaded through LoadVideo */
16644
+ declare class VideoVar extends MediaVar {
16645
+ readonly kind: 'video';
16646
+ loadInWorkflow<WID extends string>(wf: ComfyWorkflow<WID>): Promise<NodeOf<WID, 'LoadVideo'>>;
16647
+ }
16648
+ /** the var constructors: v.text / v.prompt / v.int / v.float / v.seed / v.toggle / v.choice / v.model / v.loras / v.size / v.image / v.audio / v.video */
16522
16649
  declare const v: {
16523
16650
  text: (defaultValue: string, opts?: TextVarOpts | string) => TextVar;
16524
16651
  prompt: (
@@ -16553,7 +16680,11 @@ declare const v: {
16553
16680
  label?: string;
16554
16681
  image?: ImageVar;
16555
16682
  }) => SizeVar;
16556
- image: (defaultValue: string, opts?: ImageVarOpts) => ImageVar;
16683
+ /** host-bound: only inside defineWorkflow({ vars: (v) => … }), typed per slot there */
16684
+ model: typeof model;
16685
+ image: (defaultValue: string, opts?: MediaVarOpts) => ImageVar;
16686
+ audio: (defaultValue: string, opts?: MediaVarOpts) => AudioVar;
16687
+ video: (defaultValue: string, opts?: MediaVarOpts) => VideoVar;
16557
16688
  };
16558
16689
  /**
16559
16690
  * structural face of any var: readonly `value` keeps ComfyVar<T> assignable
@@ -16593,10 +16724,26 @@ type LoraNameOf<ID extends string> = 'E_LoraName' extends keyof SdkForHost<ID>['
16593
16724
  * the `v` handed to a vars LAMBDA: the global factory, host-typed —
16594
16725
  * `v.loras(regex)` yields the host's lora-name union (resolved via bindHost)
16595
16726
  */
16596
- type BoundVars<ID extends string> = Omit<typeof v, 'loras'> & {
16727
+ type BoundVars<ID extends string> = Omit<typeof v, 'loras' | 'model'> & {
16597
16728
  loras(options: RegExp, initial?: LorasInput<LoraNameOf<ID>>, label?: string): LorasVar<LoraNameOf<ID>>;
16598
16729
  loras<T extends string>(options: readonly T[], initial?: LorasInput<T>, label?: string): LorasVar<T>;
16730
+ /** the host's file list for one loader input: the slot autocompletes, the value is its union */
16731
+ model: ModelFactory<SdkForHost<ID>['Slots']>;
16599
16732
  };
16733
+ /** `v.model` typed by a host's slot table S (`Slots`): its own interface, so the host id's
16734
+ * variance stays measurable (inlined into BoundVars, ComfyHost<ID> stopped being a ComfyHost<string>) */
16735
+ interface ModelFactory<S> {
16736
+ <K extends keyof S & string>(slot: K, opts: ModelVarOpts<S[K] & string> & {
16737
+ default: S[K] & string;
16738
+ }): ChoiceVar<S[K] & string>;
16739
+ <K extends keyof S & string>(slot: K, opts: ModelVarOpts<S[K] & string> & {
16740
+ default: null;
16741
+ }): OptionalChoiceVar<S[K] & string>;
16742
+ }
16743
+ /** every `Node.input` slot of the host's generated sdk (any string without one) */
16744
+ type SlotNameOf<ID extends string> = keyof SdkForHost<ID>['Slots'] & string;
16745
+ /** the value union of one slot, strings only (a loader file list) */
16746
+ type SlotValueOf<ID extends string, K extends string> = K extends keyof SdkForHost<ID>['Slots'] ? SdkForHost<ID>['Slots'][K] & string : string;
16600
16747
  type DefineWorkflowSpec<ID extends string, V extends VarsSpec> = {
16601
16748
  /** short id; also names the workflow instances */
16602
16749
  id?: string;
@@ -17877,6 +18024,9 @@ declare function loraTag<N extends string = string>(name: N, strength?: number,
17877
18024
  * or the package's examples/ folder was pruned.
17878
18025
  */
17879
18026
  declare function exampleImagePath(name: string): string;
18027
+ /** the same for a bundled `examples/media/` audio or video file, e.g.
18028
+ * `exampleMediaPath('sine_440hz_3s.flac')` — the default of audio and video example vars */
18029
+ declare function exampleMediaPath(name: string): string;
17880
18030
  //#endregion
17881
18031
  //#region src/promptEnhancers.d.ts
17882
18032
  type PromptEnhancer = {
@@ -17897,5 +18047,5 @@ declare function promptEnhancerPresets(): VarPresetSpec;
17897
18047
  //#region src/cli/tui-env.d.ts
17898
18048
  declare function isTuiActive(): boolean;
17899
18049
  //#endregion
17900
- export { AbsolutePath, type ActiveLora, type ActiveLoraSource, type AnyChoiceVar, type AnyVar, BaseNode, BaseNodeFactory, BaseNodeInputs, BaseNodeOutputs, type BoundVars, Branded, type CanonicalGroup, type CanonicalInput, type CanonicalLink, type CanonicalNode, type CanonicalOutput, type CanonicalWidgetValues, type CanonicalWorkflow, type ChoiceSelect, ChoiceVar, type CodegenOptions, type ComfyApiJson, type ComfyApiNodeJson, type ComfyAudioOutput, ComfyExecution, type ComfyExecutionData, type ComfyExecutionStatus, ComfyHost, ComfyHostAuthError, type ComfyHostData, type ComfyHostID, ComfyHostUnreachableError, type ComfyImageName, ComfyManager, ComfyNode, type ComfyNodeId, type ComfyNodeIdMode, type ComfyNodeMetadata, ComfyNodeOutput, type ComfyNodeSchemaJSON, ComfySchema, type ComfySchemaJSON, ComfySdkBase, ComfySdkShape, type ComfyStorage, ComfyTS, type ComfyTextOutput, type ComfyUnionValue, type ComfyUploadImageResult, ComfyUploader, ComfyVar, ComfyVarBase, ComfyWorkflow, ComfyWorkflowBuilder, type ComfyWorkflowData, type ComfyWorkflowID, type ConnectOptions, ConvertibleImageFormat, DEFAULT_IMAGE_EXTENSIONS, DEFAULT_SIZE_PRESETS, DEFAULT_STARRED_SIZES, type DefineWorkflowSpec, DefinedWorkflow, Either, EmptyRecord, type ExecutionProgress, type ExecutionSnapshot, Flavor, FloatVar, HTMLContent, ImageVar, ImageVarEmptyError, type ImageVarOpts, IntVar, InvalidPromptError, IsEqual, type LiteGraphJSON, type LmLoraItem, type LoraEntry, type LoraLane, type LoraLanes, type LoraMirror, type LoraNameOf, type LoraRecord, type LoraStrength, type LoraSweep, type LorasHost, type LorasInput, LorasVar, MDContent, Maybe, MediaImage, type MediaImageData, MultiChoiceVar, type NodeMode, NodeOf, OptionalChoiceVar, type ParsedHostBase, PartialOmit, type PluginInstallStatus, type PluginSuggestion, type ProgressReport, type PromptEnhancer, type PromptID, type PromptInput, type PromptLane, type PromptLanes, type PromptRelated_WsMsg, type PromptTagsOpts, type PromptValue, PromptVar, type PromptVarOpts, type QualifiedNodeKey, RelativePath, type Requirements, ResilientWebSocketClient, Result, ResultFailure, type RunSettings, SD15_SIZE_PRESETS, SaveOptions, SdkForHost, SeedVar, type SizePreset, type SizeValue, SizeVar, Tagged, TextVar, type TextVarOpts, ToggleVar, type VarKind, type VarPreset, type VarPresetSpec, type VarUi, type VarValues, type VarsSpec, WorkflowConvertError, WorkflowNormalizeError, type WsLike, type WsMessageEvent, type WsMsg, __FAIL, __OK, activeLoras, activePresetLabel, asAbsolutePath, asHTMLContent, asMDContent, asRelativePath, auto, auto_, clearLoraKeywordOverride, codegenSDK, convertFlowToLiteGraphJSON, convertLiteGraphToPrompt, createMemoryStorage, exampleImagePath, getComfyStorage, getLoraDisplayName, getLoraInfo, getLoraKeyword, getLoraPreviewUrl, getLoraTriggerWords, hostIdToNamespace, isLoraKeywordFromMirror, isTuiActive, loraKey, loraKeywordFromMirror, loraMatchesFilter, loraSearchNames, loraSearchText, loraTag, normalizeWorkflow, number_Timestamp, parseHostBase, parseWorkflowJson, promptEnhancerPresets, readPromptEnhancers, refreshLoraInfoCacheIfChanged, reloadLoraInfoCache, renderHttpBase, renderWsUrl, resultFailure, resultSuccess, setDefaultComfyStorage, setLoraKeyword, sizePresetsFor, toPresetList, v };
18050
+ export { AbsolutePath, type ActiveLora, type ActiveLoraSource, type AnyChoiceVar, type AnyVar, AudioVar, type AudioVarOpts, BaseNode, BaseNodeFactory, BaseNodeInputs, BaseNodeOutputs, type BoundVars, Branded, type CanonicalGroup, type CanonicalInput, type CanonicalLink, type CanonicalNode, type CanonicalOutput, type CanonicalWidgetValues, type CanonicalWorkflow, type ChoiceSelect, ChoiceVar, type CodegenOptions, type ComfyApiJson, type ComfyApiNodeJson, type ComfyAudioOutput, ComfyExecution, type ComfyExecutionData, type ComfyExecutionStatus, ComfyHost, ComfyHostAuthError, type ComfyHostData, type ComfyHostID, ComfyHostUnreachableError, type ComfyImageName, ComfyManager, ComfyNode, type ComfyNodeId, type ComfyNodeIdMode, type ComfyNodeMetadata, ComfyNodeOutput, type ComfyNodeSchemaJSON, ComfySchema, type ComfySchemaJSON, ComfySdkBase, ComfySdkShape, type ComfyStorage, ComfyTS, type ComfyTextOutput, type ComfyUnionValue, type ComfyUploadImageResult, ComfyUploader, ComfyVar, ComfyVarBase, type ComfyVideoOutput, ComfyWorkflow, ComfyWorkflowBuilder, type ComfyWorkflowData, type ComfyWorkflowID, type ConnectOptions, ConvertibleImageFormat, DEFAULT_AUDIO_EXTENSIONS, DEFAULT_IMAGE_EXTENSIONS, DEFAULT_SIZE_PRESETS, DEFAULT_STARRED_SIZES, DEFAULT_VIDEO_EXTENSIONS, type DefineWorkflowSpec, DefinedWorkflow, Either, EmptyRecord, type ExecutionProgress, type ExecutionSnapshot, Flavor, FloatVar, HTMLContent, type HostSlotSource, ImageVar, ImageVarEmptyError, type ImageVarOpts, IntVar, InvalidPromptError, IsEqual, type LiteGraphJSON, type LmLoraItem, type LoraEntry, type LoraLane, type LoraLanes, type LoraMirror, type LoraNameOf, type LoraRecord, type LoraStrength, type LoraSweep, type LorasHost, type LorasInput, LorasVar, MDContent, Maybe, MediaImage, type MediaImageData, MediaVar, MediaVarEmptyError, type MediaVarOpts, type ModelVarOpts, MultiChoiceVar, type NodeMode, NodeOf, OptionalChoiceVar, type ParsedHostBase, PartialOmit, type PluginInstallStatus, type PluginSuggestion, type ProgressReport, type PromptEnhancer, type PromptID, type PromptInput, type PromptLane, type PromptLanes, type PromptRelated_WsMsg, type PromptTagsOpts, type PromptValue, PromptVar, type PromptVarOpts, type QualifiedNodeKey, RelativePath, type Requirements, ResilientWebSocketClient, Result, ResultFailure, type RunSettings, SD15_SIZE_PRESETS, SaveOptions, SdkForHost, SeedVar, type SizePreset, type SizeValue, SizeVar, type SlotNameOf, type SlotValueOf, Tagged, TextVar, type TextVarOpts, ToggleVar, type VarKind, type VarPreset, type VarPresetSpec, type VarUi, type VarValues, type VarsSpec, VideoVar, type VideoVarOpts, WorkflowConvertError, WorkflowNormalizeError, type WsLike, type WsMessageEvent, type WsMsg, __FAIL, __OK, activeLoras, activePresetLabel, asAbsolutePath, asHTMLContent, asMDContent, asRelativePath, auto, auto_, clearLoraKeywordOverride, codegenSDK, convertFlowToLiteGraphJSON, convertLiteGraphToPrompt, createMemoryStorage, exampleImagePath, exampleMediaPath, getComfyStorage, getLoraDisplayName, getLoraInfo, getLoraKeyword, getLoraPreviewUrl, getLoraTriggerWords, hostIdToNamespace, isLoraKeywordFromMirror, isTuiActive, loraKey, loraKeywordFromMirror, loraMatchesFilter, loraSearchNames, loraSearchText, loraTag, normalizeWorkflow, number_Timestamp, parseHostBase, parseWorkflowJson, promptEnhancerPresets, readPromptEnhancers, refreshLoraInfoCacheIfChanged, reloadLoraInfoCache, renderHttpBase, renderWsUrl, resultFailure, resultSuccess, setDefaultComfyStorage, setLoraKeyword, sizePresetsFor, toPresetList, v };
17901
18051
  //# sourceMappingURL=index.d.ts.map