Repository: koishijs/novelai-bot
File: src/config.ts (TypeScript)

Code before:
      sampler: sampler.createSchema(sampler.sd),
      upscaler: Schema.union(upscalers).description('默认的放大算法。').default('Lanczos'),
      restoreFaces: Schema.boolean().description('是否启用人脸修复。').default(false),
      hiresFix: Schema.boolean().description('是否启用高分辨率修复。').default(false),
    }),
    Schema.object({
      type: Schema.const('stable-horde').required(),
      sampler: sampler.createSchema(sampler.horde),
      model: Schema.union(hordeModels).loose().description('默认的生成模型。'),
    }),
    Schema.object({
      type: Schema.const('naifu').required(),
      sampler: sampler.createSchema(sampler.nai),
    }),
    Schema.object({
      type: Schema.const('comfyui').required(),
      sampler: sampler.createSchema(sampler.comfyui).description('默认的采样器。'),
      model: Schema.string().description('默认的生成模型的文件名。').required(),
      workflowText2Image: Schema.path({
        filters: [{ name: '', extensions: ['.json'] }],
        allowCreate: true,
      }).description('API格式的图像到图像工作流。'),
      workflowImage2Image: Schema.path({
        filters: [{ name: '', extensions: ['.json'] }],
        allowCreate: true,
      }).description('API格式的图像到图像工作流。'),
      scheduler: Schema.union(schedulerComfyUI).description('默认的调度器。').default('normal'),
    }),
    Schema.intersect([
      Schema.object({
        model: Schema.union(models).loose().description('默认的生成模型。').default('nai-v3'),
      }),
      Schema.union([
        Schema.object({
          model: Schema.const('nai-v3').required(),
          sampler: sampler.createSchema(sampler.nai3),
          smea: Schema.boolean().description('默认启用 SMEA。'),
          smeaDyn: Schema.boolean().description('默认启用 SMEA 采样器的 DYN 变体。'),
          scheduler: Schema.union(scheduler).description('默认的调度器。').default('native'),
        }),
        Schema.object({ sampler: sampler.createSchema(sampler.nai) }),
      ]),
      Schema.object({ decrisper: Schema.boolean().description('默认启用 decrisper') }),
    ]),
  ] as const),

  Schema.object({
    scale: Schema.computed(Schema.number(), options).description('默认对输入的服从度。').default(5),
    textSteps: Schema.computed(Schema.natural(), options).description('文本生图时默认的迭代步数。').default(28),
    imageSteps: Schema.computed(Schema.natural(), options).description('以图生图时默认的迭代步数。').default(50),
    maxSteps: Schema.computed(Schema.natural(), options).description('允许的最大迭代步数。').default(64),

Review comment (suggestion):
```suggestion
      }).description('API 格式的图像到图像工作流。'),
```

Code after:
      sampler: sampler.createSchema(sampler.sd),
      upscaler: Schema.union(upscalers).description('默认的放大算法。').default('Lanczos'),
      restoreFaces: Schema.boolean().description('是否启用人脸修复。').default(false),
      hiresFix: Schema.boolean().description('是否启用高分辨率修复。').default(false),
    }),
    Schema.object({
      type: Schema.const('stable-horde').required(),
      sampler: sampler.createSchema(sampler.horde),
      model: Schema.union(hordeModels).loose().description('默认的生成模型。'),
    }),
    Schema.object({
      type: Schema.const('naifu').required(),
      sampler: sampler.createSchema(sampler.nai),
    }),
    Schema.object({
      type: Schema.const('comfyui').required(),
      sampler: sampler.createSchema(sampler.comfyui).description('默认的采样器。').required(),
      model: Schema.string().description('默认的生成模型的文件名。').required(),
      workflowText2Image: Schema.path({
        filters: [{ name: '', extensions: ['.json'] }],
        allowCreate: true,
      }).description('API 格式的文本到图像工作流。'),
      workflowImage2Image: Schema.path({
        filters: [{ name: '', extensions: ['.json'] }],
        allowCreate: true,
      }).description('API 格式的图像到图像工作流。'),
      scheduler: Schema.union(schedulerComfyUI).description('默认的调度器。').default('normal'),
    }),
    Schema.intersect([
      Schema.object({
        model: Schema.union(models).loose().description('默认的生成模型。').default('nai-v3'),
      }),
      Schema.union([
        Schema.object({
          model: Schema.const('nai-v3').required(),
          sampler: sampler.createSchema(sampler.nai3),
          smea: Schema.boolean().description('默认启用 SMEA。'),
          smeaDyn: Schema.boolean().description('默认启用 SMEA 采样器的 DYN 变体。'),
          scheduler: Schema.union(scheduler).description('默认的调度器。').default('native'),
        }),
        Schema.object({ sampler: sampler.createSchema(sampler.nai) }),
      ]),
      Schema.object({ decrisper: Schema.boolean().description('默认启用 decrisper') }),
    ]),
  ] as const),

  Schema.object({
    scale: Schema.computed(Schema.number(), options).description('默认对输入的服从度。').default(5),
    textSteps: Schema.computed(Schema.natural(), options).description('文本生图时默认的迭代步数。').default(28),
    imageSteps: Schema.computed(Schema.natural(), options).description('以图生图时默认的迭代步数。').default(50),
    maxSteps: Schema.computed(Schema.natural(), options).description('允许的最大迭代步数。').default(64),