三个入口的seed参数在TS契约里改用bigint

- seed 是 i64,JS number 表示不了全部取值却又没有范围校验,客户端传 64 位值会被静默舍入
- text_to_model / image_to_model / multiview_to_model 的 image_seed、model_seed、texture_seed 由 number|null 改为 bigint|null
- 同步重新生成的 ts-rs 绑定,仅这三个字段变化
This commit is contained in:
2026-09-21 19:38:47 +08:00
parent a4d9418cd3
commit c0d6531e92
6 changed files with 17 additions and 14 deletions
@@ -17,8 +17,8 @@ import type { Model3dTextureVersion } from '../common/Model3dTextureVersion';
export type Model3dImageToModelParams = {
model: Model3dModelVersion;
enableImageAutofix?: boolean | null;
modelSeed?: number | null;
textureSeed?: number | null;
modelSeed?: bigint | null;
textureSeed?: bigint | null;
texture?: boolean | null;
pbr?: boolean | null;
textureQuality?: Model3dTextureQuality | null;
@@ -12,8 +12,8 @@ import type { Model3dMultiviewInputs } from './Model3dMultiviewInputs';
export type Model3dMultiviewToModelRequest = {
inputs: Model3dMultiviewInputs;
model: Model3dModelVersion;
modelSeed?: number | null;
textureSeed?: number | null;
modelSeed?: bigint | null;
textureSeed?: bigint | null;
texture?: boolean | null;
pbr?: boolean | null;
textureQuality?: Model3dTextureQuality | null;
@@ -16,9 +16,9 @@ export type Model3dTextToModelParams = {
prompt: string;
model: Model3dModelVersion;
negativePrompt?: string | null;
imageSeed?: number | null;
modelSeed?: number | null;
textureSeed?: number | null;
imageSeed?: bigint | null;
modelSeed?: bigint | null;
textureSeed?: bigint | null;
texture?: boolean | null;
pbr?: boolean | null;
textureQuality?: Model3dTextureQuality | null;
@@ -19,10 +19,11 @@ pub struct Model3dImageToModelParams {
pub model: Model3dModelVersion,
#[ts(optional = nullable)]
pub enable_image_autofix: Option<bool>,
#[ts(type = "number | null")]
// seed 是 i64JS `number` 表示不了全部取值,因此按 bigint 导出,避免静默舍入。
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub model_seed: Option<i64>,
#[ts(type = "number | null")]
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub texture_seed: Option<i64>,
#[ts(optional = nullable)]
@@ -45,10 +45,11 @@ pub enum Model3dMultiviewInputs {
pub struct Model3dMultiviewToModelRequest {
pub inputs: Model3dMultiviewInputs,
pub model: Model3dModelVersion,
#[ts(type = "number | null")]
// seed 是 i64JS `number` 表示不了全部取值,因此按 bigint 导出,避免静默舍入。
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub model_seed: Option<i64>,
#[ts(type = "number | null")]
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub texture_seed: Option<i64>,
#[ts(optional = nullable)]
@@ -19,13 +19,14 @@ pub struct Model3dTextToModelParams {
pub model: Model3dModelVersion,
#[ts(optional = nullable)]
pub negative_prompt: Option<String>,
#[ts(type = "number | null")]
// seed 是 i64JS `number` 表示不了全部取值,因此按 bigint 导出,避免静默舍入。
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub image_seed: Option<i64>,
#[ts(type = "number | null")]
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub model_seed: Option<i64>,
#[ts(type = "number | null")]
#[ts(type = "bigint | null")]
#[ts(optional = nullable)]
pub texture_seed: Option<i64>,
#[ts(optional = nullable)]