@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,31 @@
1
+ import { ComfyImageTier, ImageTier, VideoTier } from './ModelTiersRaw';
2
+ interface NumRange {
3
+ min: number;
4
+ max: number;
5
+ step: number;
6
+ default: number;
7
+ }
8
+ interface Options<T> {
9
+ allowed: T[];
10
+ default: T | null;
11
+ }
12
+ export interface ImageModelOptions {
13
+ type: 'image';
14
+ steps: NumRange;
15
+ guidance: NumRange;
16
+ scheduler: Options<string>;
17
+ sampler: Options<string>;
18
+ }
19
+ export interface VideoModelOptions {
20
+ type: 'video';
21
+ steps: NumRange;
22
+ guidance: NumRange;
23
+ fps: Options<number>;
24
+ sampler: Options<string>;
25
+ scheduler: Options<string>;
26
+ }
27
+ export type ModelOptions = ImageModelOptions | VideoModelOptions;
28
+ export declare function mapImageTier(tier: ImageTier): ImageModelOptions;
29
+ export declare function mapComfyImageTier(tier: ComfyImageTier): ImageModelOptions;
30
+ export declare function mapVideoTier(tier: VideoTier): VideoModelOptions;
31
+ export {};
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapImageTier = mapImageTier;
4
+ exports.mapComfyImageTier = mapComfyImageTier;
5
+ exports.mapVideoTier = mapVideoTier;
6
+ const samplers_1 = require("../utils/samplers");
7
+ const scheduler_1 = require("../utils/scheduler");
8
+ function mapRange(data) {
9
+ return {
10
+ min: data.min,
11
+ max: data.max,
12
+ step: data.decimals ? Math.pow(10, 0 - data.decimals) : data.step || 1,
13
+ default: data.default
14
+ };
15
+ }
16
+ function mapOptions(data, mapper = (value) => value) {
17
+ if (!data) {
18
+ return {
19
+ allowed: [],
20
+ default: null
21
+ };
22
+ }
23
+ return {
24
+ allowed: data.allowed.map(mapper),
25
+ default: data.default !== null ? mapper(data.default) : null
26
+ };
27
+ }
28
+ function mapImageTier(tier) {
29
+ return {
30
+ type: 'image',
31
+ steps: mapRange(tier.steps),
32
+ guidance: mapRange(tier.guidance),
33
+ scheduler: mapOptions(tier.scheduler, scheduler_1.schedulerValueToAlias),
34
+ sampler: mapOptions(tier.sampler, samplers_1.samplerValueToAlias)
35
+ };
36
+ }
37
+ function mapComfyImageTier(tier) {
38
+ return {
39
+ type: 'image',
40
+ steps: mapRange(tier.steps),
41
+ guidance: mapRange(tier.guidance),
42
+ scheduler: mapOptions(tier.comfyScheduler, scheduler_1.schedulerValueToAlias),
43
+ sampler: mapOptions(tier.comfySampler, samplers_1.samplerValueToAlias)
44
+ };
45
+ }
46
+ function mapVideoTier(tier) {
47
+ return {
48
+ type: 'video',
49
+ steps: mapRange(tier.steps),
50
+ guidance: mapRange(tier.guidance),
51
+ scheduler: mapOptions(tier.comfyScheduler, scheduler_1.schedulerValueToAlias),
52
+ sampler: mapOptions(tier.comfySampler, samplers_1.samplerValueToAlias),
53
+ fps: tier.fps
54
+ };
55
+ }
56
+ //# sourceMappingURL=ModelOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelOptions.js","sourceRoot":"","sources":["../../../src/Projects/types/ModelOptions.ts"],"names":[],"mappings":";;AA8DA,oCAQC;AAED,8CAQC;AAED,oCASC;AA1FD,gDAAwD;AACxD,kDAA2D;AAsC3D,SAAS,QAAQ,CAAC,IAAqB;IACrC,OAAO;QACL,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;QACtE,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAI,IAA4B,EAAE,SAAS,CAAC,KAAQ,EAAE,EAAE,CAAC,KAAK;IAC/E,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;YACL,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;QACjC,OAAO,EAAE,IAAI,CAAC,OAAO,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;
2
+ export type ModelTier = ImageTier | VideoTier | ComfyImageTier;
3
+ export interface ComfyImageTier {
4
+ benchmark: Benchmark;
5
+ comfySampler: StringDefaults;
6
+ comfyScheduler?: StringDefaults;
7
+ defaultSize: number;
8
+ guidance: NumericDefaults;
9
+ steps: NumericDefaults;
10
+ type: 'image';
11
+ }
12
+ export declare function isComfyImageTier(t: ModelTier): t is ComfyImageTier;
13
+ export interface StringDefaults {
14
+ allowed: string[];
15
+ default: string;
16
+ }
17
+ export interface NumericDefaults {
18
+ min: number;
19
+ max: number;
20
+ decimals?: number;
21
+ default: number;
22
+ step?: number;
23
+ }
24
+ export interface ImageTier {
25
+ benchmark: Benchmark;
26
+ guidance: NumericDefaults;
27
+ modelFeeUSD?: number;
28
+ nickname?: string;
29
+ scheduler: StringDefaults;
30
+ steps: NumericDefaults;
31
+ sampler: StringDefaults;
32
+ }
33
+ export declare function isImageTier(t: ModelTier): t is ImageTier;
34
+ export interface Benchmark {
35
+ sec: number;
36
+ secContext1?: number;
37
+ secContext2?: number;
38
+ secContext3?: number;
39
+ secCN: number;
40
+ secMaxPreviews: number;
41
+ }
42
+ export interface VideoTier {
43
+ audioDuration?: DurationDefaults;
44
+ audioStart?: DurationDefaults;
45
+ benchmark: Benchmark;
46
+ comfySampler: StringDefaults;
47
+ comfyScheduler: StringDefaults;
48
+ fps: NumericOptions;
49
+ frames: NumericDefaults;
50
+ guidance: NumericDefaults;
51
+ height: NumericDefaults;
52
+ shift: NumericDefaults;
53
+ steps: NumericDefaults;
54
+ type: 'video';
55
+ videoStart?: DurationDefaults;
56
+ width: NumericDefaults;
57
+ }
58
+ export declare function isVideoTier(t: ModelTier): t is VideoTier;
59
+ export interface DurationDefaults {
60
+ min: number;
61
+ default: number;
62
+ }
63
+ export interface NumericOptions {
64
+ allowed: number[];
65
+ default: number;
66
+ }
67
+ export default ModelTiersRaw;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isComfyImageTier = isComfyImageTier;
4
+ exports.isImageTier = isImageTier;
5
+ exports.isVideoTier = isVideoTier;
6
+ function isComfyImageTier(t) {
7
+ return 'type' in t && t.type === 'image';
8
+ }
9
+ function isImageTier(t) {
10
+ return !Object.prototype.hasOwnProperty.call(t, 'type');
11
+ }
12
+ function isVideoTier(t) {
13
+ return 'type' in t && t.type === 'video';
14
+ }
15
+ //# sourceMappingURL=ModelTiersRaw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelTiersRaw.js","sourceRoot":"","sources":["../../../src/Projects/types/ModelTiersRaw.ts"],"names":[],"mappings":";;AAcA,4CAEC;AAyBD,kCAEC;AA4BD,kCAEC;AA3DD,SAAgB,gBAAgB,CAAC,CAAY;IAC3C,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC;AAC3C,CAAC;AAyBD,SAAgB,WAAW,CAAC,CAAY;IACtC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAC1D,CAAC;AA4BD,SAAgB,WAAW,CAAC,CAAY;IACtC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC;AAC3C,CAAC"}
@@ -1,14 +1,11 @@
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
  export interface SupportedModel {
9
5
  id: string;
10
6
  name: string;
11
7
  SID: number;
8
+ tier: string;
12
9
  /**
13
10
  * Media type produced by this model: 'image' or 'video'
14
11
  */
@@ -31,10 +28,6 @@ export interface SizePreset {
31
28
  ratio: string;
32
29
  aspect: string;
33
30
  }
34
- export type Sampler = ForgeSampler | ComfySampler;
35
- export type Scheduler = ForgeScheduler | ComfyScheduler;
36
- export type { ForgeSampler, ForgeScheduler, ComfySampler, ComfyScheduler };
37
- export { SupportedForgeSamplers, SupportedForgeSchedulers, SupportedComfySamplers, SupportedComfySchedulers };
38
31
  export type ImageOutputFormat = 'png' | 'jpg';
39
32
  export type VideoOutputFormat = 'mp4';
40
33
  export interface BaseProjectParams {
@@ -166,17 +159,15 @@ export interface VideoProjectParams extends BaseProjectParams {
166
159
  */
167
160
  height?: number;
168
161
  /**
169
- * ComfyUI sampler for video generation.
170
- * Uses ComfyUI's native lowercase format: euler, euler_ancestral, dpmpp_2m, etc.
171
- * Default: euler (or uni_pc for s2v models)
162
+ * Sampler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
163
+ * to get the list of available samplers.
172
164
  */
173
- sampler?: ComfySampler;
165
+ sampler?: string;
174
166
  /**
175
- * ComfyUI scheduler for video generation.
176
- * Uses ComfyUI's native lowercase format: simple, normal, karras, sgm_uniform, etc.
177
- * Default: simple
167
+ * Scheduler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
168
+ * to get the list of available schedulers.
178
169
  */
179
- scheduler?: ComfyScheduler;
170
+ scheduler?: string;
180
171
  /**
181
172
  * Output video format. For now only 'mp4' is supported, defaults to 'mp4'.
182
173
  */
@@ -203,20 +194,21 @@ export interface ImageProjectParams extends BaseProjectParams {
203
194
  startingImageStrength?: number;
204
195
  /**
205
196
  * Context images for multi-reference image generation.
206
- * Flux.2 Dev and Qwen Image Edit Plus support up to 3 context images.
197
+ * Flux.2 Dev supports up to 6 context images.
198
+ * Qwen Image Edit Plus supports up to 3 context images.
207
199
  * Flux Kontext supports up to 2 context images.
208
200
  */
209
201
  contextImages?: InputMedia[];
210
202
  /**
211
- * Legacy sampler for non-ComfyUI models (Automatic1111 workers).
212
- * Not supported for ComfyUI models - use comfySampler instead.
203
+ * Sampler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
204
+ * to get the list of available samplers.
213
205
  */
214
- sampler?: Sampler;
206
+ sampler?: string;
215
207
  /**
216
- * Legacy scheduler for non-ComfyUI models (Automatic1111 workers).
217
- * Not supported for ComfyUI models - use comfyScheduler instead.
208
+ * Scheduler, available options depend on the model. Use `sogni.projects.getModelOptions(modelId)`
209
+ * to get the list of available schedulers.
218
210
  */
219
- scheduler?: Scheduler;
211
+ scheduler?: string;
220
212
  /**
221
213
  * Size preset ID to use. You can query available size presets
222
214
  * from `sogni.projects.sizePresets(network, modelId)`
@@ -321,7 +313,7 @@ export interface EstimateRequest {
321
313
  /**
322
314
  * Sampler
323
315
  */
324
- sampler?: Sampler;
316
+ sampler?: string;
325
317
  /**
326
318
  * Number of context images to use (for Flux Kontext).
327
319
  * Note that this parameter is ignored if `scheduler` is not provided
@@ -1,16 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupportedComfySchedulers = exports.SupportedComfySamplers = exports.SupportedForgeSchedulers = exports.SupportedForgeSamplers = void 0;
4
3
  exports.isVideoParams = isVideoParams;
5
4
  exports.isImageParams = isImageParams;
6
- const ForgeSamplerParams_1 = require("./ForgeSamplerParams");
7
- Object.defineProperty(exports, "SupportedForgeSamplers", { enumerable: true, get: function () { return ForgeSamplerParams_1.SupportedForgeSamplers; } });
8
- const ForgeSchedulerParams_1 = require("./ForgeSchedulerParams");
9
- Object.defineProperty(exports, "SupportedForgeSchedulers", { enumerable: true, get: function () { return ForgeSchedulerParams_1.SupportedForgeSchedulers; } });
10
- const ComfySamplerParams_1 = require("./ComfySamplerParams");
11
- Object.defineProperty(exports, "SupportedComfySamplers", { enumerable: true, get: function () { return ComfySamplerParams_1.SupportedComfySamplers; } });
12
- const ComfySchedulerParams_1 = require("./ComfySchedulerParams");
13
- Object.defineProperty(exports, "SupportedComfySchedulers", { enumerable: true, get: function () { return ComfySchedulerParams_1.SupportedComfySchedulers; } });
14
5
  function isVideoParams(params) {
15
6
  return params.type === 'video';
16
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Projects/types/index.ts"],"names":[],"mappings":";;;AAqQA,sCAEC;AAED,sCAEC;AAxQD,6DAA4E;AAyC1E,uGAzCqB,2CAAsB,OAyCrB;AAxCxB,iEAAkF;AAyChF,yGAzCuB,+CAAwB,OAyCvB;AAxC1B,6DAA4E;AAyC1E,uGAzCqB,2CAAsB,OAyCrB;AAxCxB,iEAAkF;AAyChF,yGAzCuB,+CAAwB,OAyCvB;AAsN1B,SAAgB,aAAa,CAAC,MAAqB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;AACjC,CAAC;AAED,SAAgB,aAAa,CAAC,MAAqB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;AACjC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Projects/types/index.ts"],"names":[],"mappings":";;AAoPA,sCAEC;AAED,sCAEC;AAND,SAAgB,aAAa,CAAC,MAAqB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;AACjC,CAAC;AAED,SAAgB,aAAa,CAAC,MAAqB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;AACjC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AssetRequirement, EnhancementStrength, VideoAssetKey, VideoWorkflowType } from './types';
1
+ import { AssetRequirement, EnhancementStrength, VideoAssetKey, VideoWorkflowType } from '../types';
2
2
  export declare function getEnhacementStrength(strength: EnhancementStrength): number;
3
3
  /**
4
4
  * Check if a model ID is for a video workflow.
@@ -79,4 +79,4 @@ exports.VIDEO_WORKFLOW_ASSETS = {
79
79
  referenceAudio: 'forbidden'
80
80
  }
81
81
  };
82
- //# sourceMappingURL=utils.js.map
82
+ //# sourceMappingURL=index.js.map
@@ -0,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Ac,EAAE,WAAW;QAC3B,cAAc,EAAE,WAAW;KAC5B;IACD,GAAG,EAAE;QACH,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;QAC1B,iBAAiB,EAAE,WAAW;QAC9B,cAAc,EAAE,WAAW;KAC5B;IACD,cAAc,EAAE;QACd,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;QAC1B,iBAAiB,EAAE,WAAW;QAC9B,cAAc,EAAE,WAAW;KAC5B;IACD,iBAAiB,EAAE;QACjB,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;QAC1B,iBAAiB,EAAE,WAAW;QAC9B,cAAc,EAAE,WAAW;KAC5B;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Convert a sampler display name to its alias.
3
+ * If already an alias or unknown, returns unchanged.
4
+ * Used to normalize API tier data for consistent validation.
5
+ */
6
+ export declare function samplerValueToAlias(value: string): string;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.samplerValueToAlias = samplerValueToAlias;
4
+ /**
5
+ * Maps display name formats (from API) to lowercase aliases.
6
+ * Used to normalize the allowed sampler list so users can use consistent aliases.
7
+ */
8
+ const SamplerDisplayToAlias = {
9
+ Euler: 'euler',
10
+ 'Euler a': 'euler_a',
11
+ 'Euler Ancestral': 'euler_ancestral',
12
+ Heun: 'heun',
13
+ 'DPM++ 2M': 'dpmpp_2m',
14
+ 'DPM++ 2M SDE': 'dpmpp_2m_sde',
15
+ 'DPM++ SDE': 'dpmpp_sde',
16
+ 'DPM++ 3M SDE': 'dpmpp_3m_sde',
17
+ UniPC: 'uni_pc',
18
+ 'LCM (Latent Consistency Model)': 'lcm',
19
+ LMS: 'lms',
20
+ 'DPM 2': 'dpm_2',
21
+ 'DPM 2 Ancestral': 'dpm_2_ancestral',
22
+ 'DPM Fast': 'dpm_fast',
23
+ 'DPM Adaptive': 'dpm_adaptive',
24
+ 'DPM++ 2S Ancestral': 'dpmpp_2s_ancestral',
25
+ DDPM: 'ddpm',
26
+ 'Discrete Flow Scheduler (SD3)': 'dfs_sd3',
27
+ 'DPM Solver Multistep (DPM-Solver++)': 'dpm_pp',
28
+ 'PNDM (Pseudo-linear multi-step)': 'pndm_plms'
29
+ };
30
+ /**
31
+ * Convert a sampler display name to its alias.
32
+ * If already an alias or unknown, returns unchanged.
33
+ * Used to normalize API tier data for consistent validation.
34
+ */
35
+ function samplerValueToAlias(value) {
36
+ return SamplerDisplayToAlias[value] || value;
37
+ }
38
+ //# sourceMappingURL=samplers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"samplers.js","sourceRoot":"","sources":["../../../src/Projects/utils/samplers.ts"],"names":[],"mappings":";;AAgCA,kDAEC;AAlCD;;;GAGG;AACH,MAAM,qBAAqB,GAA2B;IACpD,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,SAAS;IACpB,iBAAiB,EAAE,iBAAiB;IACpC,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,UAAU;IACtB,cAAc,EAAE,cAAc;IAC9B,WAAW,EAAE,WAAW;IACxB,cAAc,EAAE,cAAc;IAC9B,KAAK,EAAE,QAAQ;IACf,gCAAgC,EAAE,KAAK;IACvC,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,iBAAiB;IACpC,UAAU,EAAE,UAAU;IACtB,cAAc,EAAE,cAAc;IAC9B,oBAAoB,EAAE,oBAAoB;IAC1C,IAAI,EAAE,MAAM;IACZ,+BAA+B,EAAE,SAAS;IAC1C,qCAAqC,EAAE,QAAQ;IAC/C,iCAAiC,EAAE,WAAW;CAC/C,CAAC;AAEF;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,KAAa;IAC/C,OAAO,qBAAqB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Convert a scheduler display name to its alias.
3
+ * If already an alias or unknown, returns unchanged.
4
+ * Used to normalize API tier data for consistent validation.
5
+ */
6
+ export declare function schedulerValueToAlias(value: string): string;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schedulerValueToAlias = schedulerValueToAlias;
4
+ /**
5
+ * Maps display name formats (from API) to lowercase aliases.
6
+ * Used to normalize the allowed scheduler list so users can use consistent aliases.
7
+ */
8
+ const SchedulerDisplayToAlias = {
9
+ Simple: 'simple',
10
+ Normal: 'normal',
11
+ Karras: 'karras',
12
+ Exponential: 'exponential',
13
+ 'SGM Uniform': 'sgm_uniform',
14
+ 'DDIM Uniform': 'ddim_uniform',
15
+ Beta: 'beta',
16
+ 'Linear Quadratic': 'linear_quadratic',
17
+ 'KL Optimal': 'kl_optimal',
18
+ DDIM: 'ddim',
19
+ Leading: 'leading',
20
+ Linear: 'linear'
21
+ };
22
+ /**
23
+ * Convert a scheduler display name to its alias.
24
+ * If already an alias or unknown, returns unchanged.
25
+ * Used to normalize API tier data for consistent validation.
26
+ */
27
+ function schedulerValueToAlias(value) {
28
+ return SchedulerDisplayToAlias[value] || value;
29
+ }
30
+ //# sourceMappingURL=scheduler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../../src/Projects/utils/scheduler.ts"],"names":[],"mappings":";;AAwBA,sDAEC;AA1BD;;;GAGG;AACH,MAAM,uBAAuB,GAA2B;IACtD,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,KAAa;IACjD,OAAO,uBAAuB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AACjD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,13 +6,13 @@ import { Logger, LogLevel } from './lib/DefaultLogger';
6
6
  import ProjectsApi from './Projects';
7
7
  import Job, { JobStatus } from './Projects/Job';
8
8
  import Project, { ProjectStatus } from './Projects/Project';
9
- import { AvailableModel, ImageProjectParams, ImageOutputFormat, ProjectParams, Sampler, ForgeSampler, ComfySampler, Scheduler, ForgeScheduler, ComfyScheduler, SupportedForgeSamplers, SupportedForgeSchedulers, SupportedComfySamplers, SupportedComfySchedulers, VideoProjectParams, AudioFormat, VideoFormat, VideoOutputFormat, VideoWorkflowType } from './Projects/types';
9
+ import { AvailableModel, ImageProjectParams, ImageOutputFormat, ProjectParams, VideoProjectParams, AudioFormat, VideoFormat, VideoOutputFormat, VideoWorkflowType } from './Projects/types';
10
10
  import StatsApi from './Stats';
11
11
  import ErrorData from './types/ErrorData';
12
12
  import { TokenType } from './types/token';
13
13
  import { TokenAuthData } from './lib/AuthManager';
14
- export type { AudioFormat, AvailableModel, ErrorData, ImageProjectParams, ImageOutputFormat, JobStatus, Logger, LogLevel, ProjectParams, ProjectStatus, Sampler, ForgeSampler, ComfySampler, SupernetType, Scheduler, ForgeScheduler, ComfyScheduler, TokenType, VideoFormat, VideoOutputFormat, VideoProjectParams, VideoWorkflowType };
15
- export { ApiError, CurrentAccount, Job, Project, SupportedComfySchedulers, SupportedComfySamplers, SupportedForgeSchedulers, SupportedForgeSamplers };
14
+ export type { AudioFormat, AvailableModel, ErrorData, ImageProjectParams, ImageOutputFormat, JobStatus, Logger, LogLevel, ProjectParams, ProjectStatus, SupernetType, TokenType, VideoFormat, VideoOutputFormat, VideoProjectParams, VideoWorkflowType };
15
+ export { ApiError, CurrentAccount, Job, Project };
16
16
  export interface SogniClientConfig {
17
17
  /**
18
18
  * The application ID string. Must be unique, multiple connections with the same ID will be rejected.
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
35
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.SogniClient = exports.SupportedForgeSamplers = exports.SupportedForgeSchedulers = exports.SupportedComfySamplers = exports.SupportedComfySchedulers = exports.Project = exports.Job = exports.CurrentAccount = exports.ApiError = void 0;
38
+ exports.SogniClient = exports.Project = exports.Job = exports.CurrentAccount = exports.ApiError = void 0;
39
39
  // Account API
40
40
  const Account_1 = __importDefault(require("./Account"));
41
41
  const CurrentAccount_1 = __importDefault(require("./Account/CurrentAccount"));
@@ -52,11 +52,6 @@ const Job_1 = __importDefault(require("./Projects/Job"));
52
52
  exports.Job = Job_1.default;
53
53
  const Project_1 = __importDefault(require("./Projects/Project"));
54
54
  exports.Project = Project_1.default;
55
- const types_1 = require("./Projects/types");
56
- Object.defineProperty(exports, "SupportedForgeSamplers", { enumerable: true, get: function () { return types_1.SupportedForgeSamplers; } });
57
- Object.defineProperty(exports, "SupportedForgeSchedulers", { enumerable: true, get: function () { return types_1.SupportedForgeSchedulers; } });
58
- Object.defineProperty(exports, "SupportedComfySamplers", { enumerable: true, get: function () { return types_1.SupportedComfySamplers; } });
59
- Object.defineProperty(exports, "SupportedComfySchedulers", { enumerable: true, get: function () { return types_1.SupportedComfySchedulers; } });
60
55
  // Stats API
61
56
  const Stats_1 = __importDefault(require("./Stats"));
62
57
  const AuthManager_1 = require("./lib/AuthManager");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,wDAAmC;AACnC,8EAAsD;AAoEpD,yBApEK,wBAAc,CAoEL;AAnEhB,YAAY;AACZ,yDAA+D;AAiE7D,yFAjEkB,oBAAQ,OAi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));
33
33
  });
34
34
  }
35
- //# sourceMappingURL=utils.js.map
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,kCAMC;AAED,gDAMC;AAED,sBAEC;AApBD,2CAAuC;AAEvC,SAAgB,WAAW,CAAC,KAAa;IACvC,MAAM,IAAI,GAAG,IAAA,sBAAS,EAA0D,KAAK,CAAC,CAAC;IACvF,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,IAAI;QACxB,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;KACrC,CAAC;AACJ,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAa;IAC9C,MAAM,IAAI,GAAG,IAAA,sBAAS,EAA0D,KAAK,CAAC,CAAC;IACvF,OAAO;QACL,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;KACrC,CAAC;AACJ,CAAC;AAED,SAAsB,KAAK,CAAC,EAAU;;QACpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;CAAA"}
@@ -1,3 +1,4 @@
1
+ import { ModelOptions } from '../Projects/types/ModelOptions';
1
2
  export declare function validateCustomImageSize(value: any): number;
2
3
  /**
3
4
  * Validate video dimensions for Wan 2.2 models.
@@ -12,24 +13,28 @@ interface NumberValidationOptions {
12
13
  defaultValue?: number;
13
14
  }
14
15
  export declare function validateNumber(value: any, { min, max, propertyName, defaultValue }?: NumberValidationOptions): number;
15
- export declare function validateForgeSampler(value?: string): string | null;
16
- export declare function validateForgeScheduler(value?: string): string | null;
17
16
  /**
18
17
  * Validate teacacheThreshold for T2V and I2V models.
19
18
  * Range: 0.0-1.0. 0.0 = disabled.
20
19
  */
21
20
  export declare function validateTeacacheThreshold(value?: number): number | undefined;
21
+ export declare function isComfyModel(modelId: string): boolean;
22
22
  /**
23
- * Validate ComfyUI sampler for video models.
24
- * Returns the sampler string directly (no mapping needed).
23
+ * Get the maximum number of context images supported by a model.
24
+ * - Flux.2 Dev: 6 images
25
+ * - Qwen Image Edit: 3 images
26
+ * - Flux Kontext: 2 images
27
+ * - Default: 3 images
25
28
  */
26
- export declare function validateComfySampler(value?: string): string | undefined;
29
+ export declare function getMaxContextImages(modelId: string): number;
27
30
  /**
28
- * Validate ComfyUI scheduler for video models.
29
- * Returns the scheduler string directly (no mapping needed).
31
+ * Validate sampler value against allowed options.
32
+ * Returns the validated value unchanged - sogni-socket handles normalization.
30
33
  */
31
- export declare function validateComfyScheduler(value?: string): string | undefined;
32
- export declare function isComfyModel(modelId: string): boolean;
33
- export declare function validateSampler(modelId: string, sampler: string): string | null | undefined;
34
- export declare function validateScheduler(modelId: string, scheduler: string): string | null | undefined;
34
+ export declare function validateSampler(value: string | undefined, options: ModelOptions): string | null;
35
+ /**
36
+ * Validate scheduler value against allowed options.
37
+ * Returns the validated value unchanged - sogni-socket handles normalization.
38
+ */
39
+ export declare function validateScheduler(value: string | undefined, options: ModelOptions): string | null;
35
40
  export {};