@sogni-ai/sogni-client 4.0.0-alpha.45 → 4.0.0-alpha.47

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 (65) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +32 -27
  3. package/dist/Projects/createJobRequestMessage.d.ts +2 -1
  4. package/dist/Projects/createJobRequestMessage.js +29 -27
  5. package/dist/Projects/createJobRequestMessage.js.map +1 -1
  6. package/dist/Projects/index.d.ts +4 -2
  7. package/dist/Projects/index.js +45 -17
  8. package/dist/Projects/index.js.map +1 -1
  9. package/dist/Projects/types/ComfySamplerParams.d.ts +0 -28
  10. package/dist/Projects/types/ComfySamplerParams.js +0 -34
  11. package/dist/Projects/types/ComfySamplerParams.js.map +1 -1
  12. package/dist/Projects/types/ModelOptions.d.ts +31 -0
  13. package/dist/Projects/types/ModelOptions.js +56 -0
  14. package/dist/Projects/types/ModelOptions.js.map +1 -0
  15. package/dist/Projects/types/ModelTiersRaw.d.ts +67 -0
  16. package/dist/Projects/types/ModelTiersRaw.js +15 -0
  17. package/dist/Projects/types/ModelTiersRaw.js.map +1 -0
  18. package/dist/Projects/types/index.d.ts +16 -24
  19. package/dist/Projects/types/index.js +0 -9
  20. package/dist/Projects/types/index.js.map +1 -1
  21. package/dist/Projects/{utils.d.ts → utils/index.d.ts} +1 -1
  22. package/dist/Projects/{utils.js → utils/index.js} +1 -1
  23. package/dist/Projects/utils/index.js.map +1 -0
  24. package/dist/Projects/utils/samplers.d.ts +6 -0
  25. package/dist/Projects/utils/samplers.js +38 -0
  26. package/dist/Projects/utils/samplers.js.map +1 -0
  27. package/dist/Projects/utils/scheduler.d.ts +6 -0
  28. package/dist/Projects/utils/scheduler.js +30 -0
  29. package/dist/Projects/utils/scheduler.js.map +1 -0
  30. package/dist/index.d.ts +3 -3
  31. package/dist/index.js +1 -6
  32. package/dist/index.js.map +1 -1
  33. package/dist/lib/{utils.js → utils/index.js} +1 -1
  34. package/dist/lib/utils/index.js.map +1 -0
  35. package/dist/lib/validation.d.ts +16 -11
  36. package/dist/lib/validation.js +45 -63
  37. package/dist/lib/validation.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/Projects/createJobRequestMessage.ts +43 -33
  40. package/src/Projects/index.ts +54 -28
  41. package/src/Projects/types/ComfySamplerParams.ts +0 -34
  42. package/src/Projects/types/ModelOptions.ts +92 -0
  43. package/src/Projects/types/ModelTiersRaw.ts +86 -0
  44. package/src/Projects/types/index.ts +16 -33
  45. package/src/Projects/{utils.ts → utils/index.ts} +1 -1
  46. package/src/Projects/utils/samplers.ts +35 -0
  47. package/src/Projects/utils/scheduler.ts +27 -0
  48. package/src/index.ts +1 -26
  49. package/src/lib/validation.ts +53 -77
  50. package/dist/Projects/types/ComfySchedulerParams.d.ts +0 -17
  51. package/dist/Projects/types/ComfySchedulerParams.js +0 -23
  52. package/dist/Projects/types/ComfySchedulerParams.js.map +0 -1
  53. package/dist/Projects/types/ForgeSamplerParams.d.ts +0 -27
  54. package/dist/Projects/types/ForgeSamplerParams.js +0 -39
  55. package/dist/Projects/types/ForgeSamplerParams.js.map +0 -1
  56. package/dist/Projects/types/ForgeSchedulerParams.d.ts +0 -17
  57. package/dist/Projects/types/ForgeSchedulerParams.js +0 -28
  58. package/dist/Projects/types/ForgeSchedulerParams.js.map +0 -1
  59. package/dist/Projects/utils.js.map +0 -1
  60. package/dist/lib/utils.js.map +0 -1
  61. package/src/Projects/types/ComfySchedulerParams.ts +0 -21
  62. package/src/Projects/types/ForgeSamplerParams.ts +0 -37
  63. package/src/Projects/types/ForgeSchedulerParams.ts +0 -26
  64. /package/dist/lib/{utils.d.ts → utils/index.d.ts} +0 -0
  65. /package/src/lib/{utils.ts → utils/index.ts} +0 -0
@@ -0,0 +1,86 @@
1
+ export type ModelTiersRaw = Record<string, ModelTier>;
2
+
3
+ export type ModelTier = ImageTier | VideoTier | ComfyImageTier;
4
+
5
+ export interface ComfyImageTier {
6
+ benchmark: Benchmark;
7
+ comfySampler: StringDefaults;
8
+ comfyScheduler?: StringDefaults;
9
+ defaultSize: number;
10
+ guidance: NumericDefaults;
11
+ steps: NumericDefaults;
12
+ type: 'image';
13
+ }
14
+
15
+ export function isComfyImageTier(t: ModelTier): t is ComfyImageTier {
16
+ return 'type' in t && t.type === 'image';
17
+ }
18
+
19
+ export interface StringDefaults {
20
+ allowed: string[];
21
+ default: string;
22
+ }
23
+
24
+ export interface NumericDefaults {
25
+ min: number;
26
+ max: number;
27
+ decimals?: number;
28
+ default: number;
29
+ step?: number;
30
+ }
31
+
32
+ export interface ImageTier {
33
+ benchmark: Benchmark;
34
+ guidance: NumericDefaults;
35
+ modelFeeUSD?: number;
36
+ nickname?: string;
37
+ scheduler: StringDefaults;
38
+ steps: NumericDefaults;
39
+ sampler: StringDefaults;
40
+ }
41
+
42
+ export function isImageTier(t: ModelTier): t is ImageTier {
43
+ return !Object.prototype.hasOwnProperty.call(t, 'type');
44
+ }
45
+
46
+ export interface Benchmark {
47
+ sec: number;
48
+ secContext1?: number;
49
+ secContext2?: number;
50
+ secContext3?: number;
51
+ secCN: number;
52
+ secMaxPreviews: number;
53
+ }
54
+
55
+ export interface VideoTier {
56
+ audioDuration?: DurationDefaults;
57
+ audioStart?: DurationDefaults;
58
+ benchmark: Benchmark;
59
+ comfySampler: StringDefaults;
60
+ comfyScheduler: StringDefaults;
61
+ fps: NumericOptions;
62
+ frames: NumericDefaults;
63
+ guidance: NumericDefaults;
64
+ height: NumericDefaults;
65
+ shift: NumericDefaults;
66
+ steps: NumericDefaults;
67
+ type: 'video';
68
+ videoStart?: DurationDefaults;
69
+ width: NumericDefaults;
70
+ }
71
+
72
+ export function isVideoTier(t: ModelTier): t is VideoTier {
73
+ return 'type' in t && t.type === 'video';
74
+ }
75
+
76
+ export interface DurationDefaults {
77
+ min: number;
78
+ default: number;
79
+ }
80
+
81
+ export interface NumericOptions {
82
+ allowed: number[];
83
+ default: number;
84
+ }
85
+
86
+ export default ModelTiersRaw;
@@ -1,15 +1,12 @@
1
1
  import { SupernetType } from '../../ApiClient/WebSocketClient/types';
2
2
  import { ControlNetParams } from './ControlNetParams';
3
3
  import { TokenType } from '../../types/token';
4
- import { ForgeSampler, SupportedForgeSamplers } from './ForgeSamplerParams';
5
- import { ForgeScheduler, SupportedForgeSchedulers } from './ForgeSchedulerParams';
6
- import { ComfySampler, SupportedComfySamplers } from './ComfySamplerParams';
7
- import { ComfyScheduler, SupportedComfySchedulers } from './ComfySchedulerParams';
8
4
 
9
5
  export interface SupportedModel {
10
6
  id: string;
11
7
  name: string;
12
8
  SID: number;
9
+ tier: string;
13
10
  /**
14
11
  * Media type produced by this model: 'image' or 'video'
15
12
  */
@@ -35,19 +32,6 @@ export interface SizePreset {
35
32
  aspect: string;
36
33
  }
37
34
 
38
- export type Sampler = ForgeSampler | ComfySampler;
39
-
40
- export type Scheduler = ForgeScheduler | ComfyScheduler;
41
-
42
- export type { ForgeSampler, ForgeScheduler, ComfySampler, ComfyScheduler };
43
-
44
- export {
45
- SupportedForgeSamplers,
46
- SupportedForgeSchedulers,
47
- SupportedComfySamplers,
48
- SupportedComfySchedulers
49
- };
50
-
51
35
  export type ImageOutputFormat = 'png' | 'jpg';
52
36
  export type VideoOutputFormat = 'mp4';
53
37
 
@@ -182,17 +166,15 @@ export interface VideoProjectParams extends BaseProjectParams {
182
166
  */
183
167
  height?: number;
184
168
  /**
185
- * ComfyUI sampler for video generation.
186
- * Uses ComfyUI's native lowercase format: euler, euler_ancestral, dpmpp_2m, etc.
187
- * Default: euler (or uni_pc for s2v models)
169
+ * Sampler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
170
+ * to get the list of available samplers.
188
171
  */
189
- sampler?: ComfySampler;
172
+ sampler?: string;
190
173
  /**
191
- * ComfyUI scheduler for video generation.
192
- * Uses ComfyUI's native lowercase format: simple, normal, karras, sgm_uniform, etc.
193
- * Default: simple
174
+ * Scheduler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
175
+ * to get the list of available schedulers.
194
176
  */
195
- scheduler?: ComfyScheduler;
177
+ scheduler?: string;
196
178
  /**
197
179
  * Output video format. For now only 'mp4' is supported, defaults to 'mp4'.
198
180
  */
@@ -220,20 +202,21 @@ export interface ImageProjectParams extends BaseProjectParams {
220
202
  startingImageStrength?: number;
221
203
  /**
222
204
  * Context images for multi-reference image generation.
223
- * Flux.2 Dev and Qwen Image Edit Plus support up to 3 context images.
205
+ * Flux.2 Dev supports up to 6 context images.
206
+ * Qwen Image Edit Plus supports up to 3 context images.
224
207
  * Flux Kontext supports up to 2 context images.
225
208
  */
226
209
  contextImages?: InputMedia[];
227
210
  /**
228
- * Legacy sampler for non-ComfyUI models (Automatic1111 workers).
229
- * Not supported for ComfyUI models - use comfySampler instead.
211
+ * Sampler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
212
+ * to get the list of available samplers.
230
213
  */
231
- sampler?: Sampler;
214
+ sampler?: string;
232
215
  /**
233
- * Legacy scheduler for non-ComfyUI models (Automatic1111 workers).
234
- * Not supported for ComfyUI models - use comfyScheduler instead.
216
+ * Scheduler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
217
+ * to get the list of available schedulers.
235
218
  */
236
- scheduler?: Scheduler;
219
+ scheduler?: string;
237
220
  /**
238
221
  * Size preset ID to use. You can query available size presets
239
222
  * from `sogni.projects.sizePresets(network, modelId)`
@@ -362,7 +345,7 @@ export interface EstimateRequest {
362
345
  /**
363
346
  * Sampler
364
347
  */
365
- sampler?: Sampler;
348
+ sampler?: string;
366
349
  /**
367
350
  * Number of context images to use (for Flux Kontext).
368
351
  * Note that this parameter is ignored if `scheduler` is not provided
@@ -1,4 +1,4 @@
1
- import { AssetRequirement, EnhancementStrength, VideoAssetKey, VideoWorkflowType } from './types';
1
+ import { AssetRequirement, EnhancementStrength, VideoAssetKey, VideoWorkflowType } from '../types';
2
2
 
3
3
  export function getEnhacementStrength(strength: EnhancementStrength): number {
4
4
  switch (strength) {
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Maps display name formats (from API) to lowercase aliases.
3
+ * Used to normalize the allowed sampler list so users can use consistent aliases.
4
+ */
5
+ const SamplerDisplayToAlias: Record<string, string> = {
6
+ Euler: 'euler',
7
+ 'Euler a': 'euler_a',
8
+ 'Euler Ancestral': 'euler_ancestral',
9
+ Heun: 'heun',
10
+ 'DPM++ 2M': 'dpmpp_2m',
11
+ 'DPM++ 2M SDE': 'dpmpp_2m_sde',
12
+ 'DPM++ SDE': 'dpmpp_sde',
13
+ 'DPM++ 3M SDE': 'dpmpp_3m_sde',
14
+ UniPC: 'uni_pc',
15
+ 'LCM (Latent Consistency Model)': 'lcm',
16
+ LMS: 'lms',
17
+ 'DPM 2': 'dpm_2',
18
+ 'DPM 2 Ancestral': 'dpm_2_ancestral',
19
+ 'DPM Fast': 'dpm_fast',
20
+ 'DPM Adaptive': 'dpm_adaptive',
21
+ 'DPM++ 2S Ancestral': 'dpmpp_2s_ancestral',
22
+ DDPM: 'ddpm',
23
+ 'Discrete Flow Scheduler (SD3)': 'dfs_sd3',
24
+ 'DPM Solver Multistep (DPM-Solver++)': 'dpm_pp',
25
+ 'PNDM (Pseudo-linear multi-step)': 'pndm_plms'
26
+ };
27
+
28
+ /**
29
+ * Convert a sampler display name to its alias.
30
+ * If already an alias or unknown, returns unchanged.
31
+ * Used to normalize API tier data for consistent validation.
32
+ */
33
+ export function samplerValueToAlias(value: string): string {
34
+ return SamplerDisplayToAlias[value] || value;
35
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Maps display name formats (from API) to lowercase aliases.
3
+ * Used to normalize the allowed scheduler list so users can use consistent aliases.
4
+ */
5
+ const SchedulerDisplayToAlias: Record<string, string> = {
6
+ Simple: 'simple',
7
+ Normal: 'normal',
8
+ Karras: 'karras',
9
+ Exponential: 'exponential',
10
+ 'SGM Uniform': 'sgm_uniform',
11
+ 'DDIM Uniform': 'ddim_uniform',
12
+ Beta: 'beta',
13
+ 'Linear Quadratic': 'linear_quadratic',
14
+ 'KL Optimal': 'kl_optimal',
15
+ DDIM: 'ddim',
16
+ Leading: 'leading',
17
+ Linear: 'linear'
18
+ };
19
+
20
+ /**
21
+ * Convert a scheduler display name to its alias.
22
+ * If already an alias or unknown, returns unchanged.
23
+ * Used to normalize API tier data for consistent validation.
24
+ */
25
+ export function schedulerValueToAlias(value: string): string {
26
+ return SchedulerDisplayToAlias[value] || value;
27
+ }
package/src/index.ts CHANGED
@@ -17,16 +17,6 @@ import {
17
17
  ImageProjectParams,
18
18
  ImageOutputFormat,
19
19
  ProjectParams,
20
- Sampler,
21
- ForgeSampler,
22
- ComfySampler,
23
- Scheduler,
24
- ForgeScheduler,
25
- ComfyScheduler,
26
- SupportedForgeSamplers,
27
- SupportedForgeSchedulers,
28
- SupportedComfySamplers,
29
- SupportedComfySchedulers,
30
20
  VideoProjectParams,
31
21
  AudioFormat,
32
22
  VideoFormat,
@@ -52,13 +42,7 @@ export type {
52
42
  LogLevel,
53
43
  ProjectParams,
54
44
  ProjectStatus,
55
- Sampler,
56
- ForgeSampler,
57
- ComfySampler,
58
45
  SupernetType,
59
- Scheduler,
60
- ForgeScheduler,
61
- ComfyScheduler,
62
46
  TokenType,
63
47
  VideoFormat,
64
48
  VideoOutputFormat,
@@ -66,16 +50,7 @@ export type {
66
50
  VideoWorkflowType
67
51
  };
68
52
 
69
- export {
70
- ApiError,
71
- CurrentAccount,
72
- Job,
73
- Project,
74
- SupportedComfySchedulers,
75
- SupportedComfySamplers,
76
- SupportedForgeSchedulers,
77
- SupportedForgeSamplers
78
- };
53
+ export { ApiError, CurrentAccount, Job, Project };
79
54
 
80
55
  export interface SogniClientConfig {
81
56
  /**
@@ -1,15 +1,5 @@
1
- import {
2
- isRawForgeSampler,
3
- isForgeSampler,
4
- SupportedForgeSamplers
5
- } from '../Projects/types/ForgeSamplerParams';
6
- import {
7
- isForgeScheduler,
8
- isRawForgeScheduler,
9
- SupportedForgeSchedulers
10
- } from '../Projects/types/ForgeSchedulerParams';
11
- import { isComfySampler, SupportedComfySamplers } from '../Projects/types/ComfySamplerParams';
12
- import { isComfyScheduler, SupportedComfySchedulers } from '../Projects/types/ComfySchedulerParams';
1
+ import { ApiError } from '../ApiClient';
2
+ import { ModelOptions } from '../Projects/types/ModelOptions';
13
3
 
14
4
  export function validateCustomImageSize(value: any): number {
15
5
  return validateNumber(value, { min: 256, max: 2048, propertyName: 'Width and height' });
@@ -64,36 +54,6 @@ export function validateNumber(
64
54
  return number;
65
55
  }
66
56
 
67
- export function validateForgeSampler(value?: string) {
68
- if (!value) {
69
- return null;
70
- }
71
- if (isRawForgeSampler(value)) {
72
- return value;
73
- }
74
- if (isForgeSampler(value)) {
75
- return SupportedForgeSamplers[value];
76
- }
77
- throw new Error(
78
- `Invalid sampler: ${value}. Supported options: ${Object.keys(SupportedForgeSamplers).join(', ')}`
79
- );
80
- }
81
-
82
- export function validateForgeScheduler(value?: string) {
83
- if (!value) {
84
- return null;
85
- }
86
- if (isRawForgeScheduler(value)) {
87
- return value;
88
- }
89
- if (isForgeScheduler(value)) {
90
- return SupportedForgeSchedulers[value];
91
- }
92
- throw new Error(
93
- `Invalid scheduler: ${value}. Supported options: ${Object.keys(SupportedForgeSchedulers).join(', ')}`
94
- );
95
- }
96
-
97
57
  /**
98
58
  * Validate teacacheThreshold for T2V and I2V models.
99
59
  * Range: 0.0-1.0. 0.0 = disabled.
@@ -112,53 +72,69 @@ export function validateTeacacheThreshold(value?: number): number | undefined {
112
72
  return num;
113
73
  }
114
74
 
115
- /**
116
- * Validate ComfyUI sampler for video models.
117
- * Returns the sampler string directly (no mapping needed).
118
- */
119
- export function validateComfySampler(value?: string): string | undefined {
120
- if (!value) {
121
- return undefined;
122
- }
123
- if (isComfySampler(value)) {
124
- return SupportedComfySamplers[value];
125
- }
126
- throw new Error(
127
- `Invalid comfySampler: ${value}. Supported options: ${Object.keys(SupportedComfySamplers).join(', ')}`
128
- );
75
+ export function isComfyModel(modelId: string): boolean {
76
+ const COMFY_PREFIXES = ['z_image_', 'qwen_image_', 'flux2_', 'wan_'];
77
+ return COMFY_PREFIXES.some((prefix) => modelId.startsWith(prefix));
129
78
  }
130
79
 
131
80
  /**
132
- * Validate ComfyUI scheduler for video models.
133
- * Returns the scheduler string directly (no mapping needed).
81
+ * Get the maximum number of context images supported by a model.
82
+ * - Flux.2 Dev: 6 images
83
+ * - Qwen Image Edit: 3 images
84
+ * - Flux Kontext: 2 images
85
+ * - Default: 3 images
134
86
  */
135
- export function validateComfyScheduler(value?: string): string | undefined {
136
- if (!value) {
137
- return undefined;
87
+ export function getMaxContextImages(modelId: string): number {
88
+ if (modelId.startsWith('flux2_')) {
89
+ return 6;
138
90
  }
139
- if (isComfyScheduler(value)) {
140
- return SupportedComfySchedulers[value];
91
+ if (modelId.startsWith('qwen_image_')) {
92
+ return 3;
141
93
  }
142
- throw new Error(
143
- `Invalid comfyScheduler: ${value}. Supported options: ${Object.keys(SupportedComfySchedulers).join(', ')}`
144
- );
94
+ if (modelId.includes('kontext')) {
95
+ return 2;
96
+ }
97
+ // Default fallback for other models that might support context images
98
+ return 3;
145
99
  }
146
100
 
147
- export function isComfyModel(modelId: string): boolean {
148
- const COMFY_PREFIXES = ['z_image_', 'qwen_image_', 'flux2_', 'wan_'];
149
- return COMFY_PREFIXES.some((prefix) => modelId.startsWith(prefix));
101
+ function validateOption<T = unknown>(value: T, options: T[], errorMessage: string): T {
102
+ if (!options.includes(value)) {
103
+ throw new ApiError(400, {
104
+ status: 'error',
105
+ errorCode: 0,
106
+ message: errorMessage
107
+ });
108
+ }
109
+ return value;
150
110
  }
151
111
 
152
- export function validateSampler(modelId: string, sampler: string) {
153
- if (isComfyModel(modelId)) {
154
- return validateComfySampler(sampler);
112
+ /**
113
+ * Validate sampler value against allowed options.
114
+ * Returns the validated value unchanged - sogni-socket handles normalization.
115
+ */
116
+ export function validateSampler(value: string | undefined, options: ModelOptions) {
117
+ if (!options.sampler.allowed.length || !value) {
118
+ return null;
155
119
  }
156
- return validateForgeSampler(sampler);
120
+ return validateOption(
121
+ value,
122
+ options.sampler.allowed,
123
+ `Invalid sampler ${value}. Must be one of "${options.sampler.allowed.join('", "')}".`
124
+ );
157
125
  }
158
126
 
159
- export function validateScheduler(modelId: string, scheduler: string) {
160
- if (isComfyModel(modelId)) {
161
- return validateComfyScheduler(scheduler);
127
+ /**
128
+ * Validate scheduler value against allowed options.
129
+ * Returns the validated value unchanged - sogni-socket handles normalization.
130
+ */
131
+ export function validateScheduler(value: string | undefined, options: ModelOptions) {
132
+ if (!options.scheduler.allowed.length || !value) {
133
+ return null;
162
134
  }
163
- return validateForgeScheduler(scheduler);
135
+ return validateOption(
136
+ value,
137
+ options.scheduler.allowed,
138
+ `Invalid scheduler ${value}. Must be one of "${options.scheduler.allowed.join('", "')}".`
139
+ );
164
140
  }
@@ -1,17 +0,0 @@
1
- /**
2
- * ComfyUI scheduler parameters for video models and ComfyUI-based image models.
3
- * These use lowercase underscore format directly matching ComfyUI's internal names.
4
- */
5
- export declare const SupportedComfySchedulers: {
6
- simple: string;
7
- normal: string;
8
- karras: string;
9
- exponential: string;
10
- sgm_uniform: string;
11
- ddim_uniform: string;
12
- beta: string;
13
- linear_quadratic: string;
14
- kl_optimal: string;
15
- };
16
- export declare function isComfyScheduler(scheduler: string): scheduler is ComfyScheduler;
17
- export type ComfyScheduler = keyof typeof SupportedComfySchedulers;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportedComfySchedulers = void 0;
4
- exports.isComfyScheduler = isComfyScheduler;
5
- /**
6
- * ComfyUI scheduler parameters for video models and ComfyUI-based image models.
7
- * These use lowercase underscore format directly matching ComfyUI's internal names.
8
- */
9
- exports.SupportedComfySchedulers = {
10
- simple: 'simple',
11
- normal: 'normal',
12
- karras: 'karras',
13
- exponential: 'exponential',
14
- sgm_uniform: 'sgm_uniform',
15
- ddim_uniform: 'ddim_uniform',
16
- beta: 'beta',
17
- linear_quadratic: 'linear_quadratic',
18
- kl_optimal: 'kl_optimal'
19
- };
20
- function isComfyScheduler(scheduler) {
21
- return scheduler in exports.SupportedComfySchedulers;
22
- }
23
- //# sourceMappingURL=ComfySchedulerParams.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComfySchedulerParams.js","sourceRoot":"","sources":["../../../src/Projects/types/ComfySchedulerParams.ts"],"names":[],"mappings":";;;AAgBA,4CAEC;AAlBD;;;GAGG;AACU,QAAA,wBAAwB,GAAG;IACtC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,YAAY;CACzB,CAAC;AAEF,SAAgB,gBAAgB,CAAC,SAAiB;IAChD,OAAO,SAAS,IAAI,gCAAwB,CAAC;AAC/C,CAAC"}
@@ -1,27 +0,0 @@
1
- export declare const SupportedForgeSamplers: {
2
- euler: string;
3
- euler_ancestral: string;
4
- heun: string;
5
- dpmpp_2m: string;
6
- dpmpp_2m_sde: string;
7
- dpmpp_sde: string;
8
- dpmpp_3m_sde: string;
9
- uni_pc: string;
10
- lcm: string;
11
- lms: string;
12
- dpm_2: string;
13
- dpm_2_ancestral: string;
14
- dpm_fast: string;
15
- dpm_adaptive: string;
16
- dpmpp_2s_ancestral: string;
17
- ddpm: string;
18
- dfs_sd3: string;
19
- dpm_pp: string;
20
- dpm_pp_sde: string;
21
- dpm_pp_2m: string;
22
- euler_a: string;
23
- pndm_plms: string;
24
- };
25
- export declare function isForgeSampler(sampler: string): sampler is ForgeSampler;
26
- export declare function isRawForgeSampler(sampler: string): boolean;
27
- export type ForgeSampler = keyof typeof SupportedForgeSamplers;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportedForgeSamplers = void 0;
4
- exports.isForgeSampler = isForgeSampler;
5
- exports.isRawForgeSampler = isRawForgeSampler;
6
- exports.SupportedForgeSamplers = {
7
- euler: 'Euler',
8
- euler_ancestral: 'Euler Ancestral',
9
- heun: 'Heun',
10
- dpmpp_2m: 'DPM++ 2M',
11
- dpmpp_2m_sde: 'DPM++ 2M SDE',
12
- dpmpp_sde: 'DPM++ SDE',
13
- dpmpp_3m_sde: 'DPM++ 3M SDE',
14
- uni_pc: 'UniPC',
15
- lcm: 'LCM (Latent Consistency Model)',
16
- // Legacy/other supported samplers
17
- lms: 'LMS',
18
- dpm_2: 'DPM 2',
19
- dpm_2_ancestral: 'DPM 2 Ancestral',
20
- dpm_fast: 'DPM Fast',
21
- dpm_adaptive: 'DPM Adaptive',
22
- dpmpp_2s_ancestral: 'DPM++ 2S Ancestral',
23
- ddpm: 'DDPM',
24
- // SDK compatibility aliases
25
- dfs_sd3: 'Discrete Flow Scheduler (SD3)',
26
- dpm_pp: 'DPM Solver Multistep (DPM-Solver++)',
27
- dpm_pp_sde: 'DPM++ SDE',
28
- dpm_pp_2m: 'DPM++ 2M',
29
- euler_a: 'Euler a',
30
- pndm_plms: 'PNDM (Pseudo-linear multi-step)'
31
- };
32
- function isForgeSampler(sampler) {
33
- return sampler in exports.SupportedForgeSamplers;
34
- }
35
- function isRawForgeSampler(sampler) {
36
- const samplers = Object.values(exports.SupportedForgeSamplers);
37
- return samplers.includes(sampler);
38
- }
39
- //# sourceMappingURL=ForgeSamplerParams.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ForgeSamplerParams.js","sourceRoot":"","sources":["../../../src/Projects/types/ForgeSamplerParams.ts"],"names":[],"mappings":";;;AA2BA,wCAEC;AAED,8CAGC;AAlCY,QAAA,sBAAsB,GAAG;IACpC,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,iBAAiB;IAClC,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,OAAO;IACf,GAAG,EAAE,gCAAgC;IACrC,kCAAkC;IAClC,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,iBAAiB;IAClC,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,kBAAkB,EAAE,oBAAoB;IACxC,IAAI,EAAE,MAAM;IACZ,4BAA4B;IAC5B,OAAO,EAAE,+BAA+B;IACxC,MAAM,EAAE,qCAAqC;IAC7C,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,iCAAiC;CAC7C,CAAC;AAEF,SAAgB,cAAc,CAAC,OAAe;IAC5C,OAAO,OAAO,IAAI,8BAAsB,CAAC;AAC3C,CAAC;AAED,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,8BAAsB,CAAC,CAAC;IACvD,OAAO,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC"}
@@ -1,17 +0,0 @@
1
- export declare const SupportedForgeSchedulers: {
2
- simple: string;
3
- normal: string;
4
- karras: string;
5
- exponential: string;
6
- sgm_uniform: string;
7
- ddim_uniform: string;
8
- beta: string;
9
- linear_quadratic: string;
10
- kl_optimal: string;
11
- ddim: string;
12
- leading: string;
13
- linear: string;
14
- };
15
- export declare function isForgeScheduler(scheduler: string): scheduler is ForgeScheduler;
16
- export declare function isRawForgeScheduler(scheduler: string): boolean;
17
- export type ForgeScheduler = keyof typeof SupportedForgeSchedulers;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportedForgeSchedulers = void 0;
4
- exports.isForgeScheduler = isForgeScheduler;
5
- exports.isRawForgeScheduler = isRawForgeScheduler;
6
- exports.SupportedForgeSchedulers = {
7
- simple: 'Simple',
8
- normal: 'Normal',
9
- karras: 'Karras',
10
- exponential: 'Exponential',
11
- sgm_uniform: 'SGM Uniform',
12
- ddim_uniform: 'DDIM Uniform',
13
- beta: 'Beta',
14
- linear_quadratic: 'Linear Quadratic',
15
- kl_optimal: 'KL Optimal',
16
- // Legacy aliases
17
- ddim: 'DDIM',
18
- leading: 'Leading',
19
- linear: 'Linear'
20
- };
21
- function isForgeScheduler(scheduler) {
22
- return scheduler in exports.SupportedForgeSchedulers;
23
- }
24
- function isRawForgeScheduler(scheduler) {
25
- const schedulers = Object.values(exports.SupportedForgeSchedulers);
26
- return schedulers.includes(scheduler);
27
- }
28
- //# sourceMappingURL=ForgeSchedulerParams.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ForgeSchedulerParams.js","sourceRoot":"","sources":["../../../src/Projects/types/ForgeSchedulerParams.ts"],"names":[],"mappings":";;;AAgBA,4CAEC;AAED,kDAGC;AAvBY,QAAA,wBAAwB,GAAG;IACtC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,YAAY;IACxB,iBAAiB;IACjB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,SAAgB,gBAAgB,CAAC,SAAiB;IAChD,OAAO,SAAS,IAAI,gCAAwB,CAAC;AAC/C,CAAC;AAED,SAAgB,mBAAmB,CAAC,SAAiB;IACnD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,gCAAwB,CAAC,CAAC;IAC3D,OAAO,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"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yUI scheduler parameters for video models and ComfyUI-based image models.
3
- * These use lowercase underscore format directly matching ComfyUI's internal names.
4
- */
5
- export const SupportedComfySchedulers = {
6
- simple: 'simple',
7
- normal: 'normal',
8
- karras: 'karras',
9
- exponential: 'exponential',
10
- sgm_uniform: 'sgm_uniform',
11
- ddim_uniform: 'ddim_uniform',
12
- beta: 'beta',
13
- linear_quadratic: 'linear_quadratic',
14
- kl_optimal: 'kl_optimal'
15
- };
16
-
17
- export function isComfyScheduler(scheduler: string): scheduler is ComfyScheduler {
18
- return scheduler in SupportedComfySchedulers;
19
- }
20
-
21
- export type ComfyScheduler = keyof typeof SupportedComfySchedulers;