跳转到内容

Fooocus Upscale or Vary

集成

模型 id fooocus/upscale-or-vary
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/fooocus/upscale-or-vary?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uov_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此请求: ≈$0.007 7 API 积分 在此页面运行

获取 API 密钥
Open model 超分辨率 #upscaling#vary#stylized

Fooocus 工具,可将图像放大 1.5x 或 2x,或生成细微或明显的图像变体

Open model · 图像

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

默认

描述要生成的图像;请尽可能提供详细信息以获得最佳结果。

•必填
拖放文件,或

用于放大或生成变体的源图像。

默认 1024x1024

输出图像尺寸,可从预设中选择,或指定自定义宽度和高度。两个自定义尺寸都必须能被 8 整除。

num_images 默认 1

每个请求生成的图像数量。

高级 negative_prompt · performance · output_format · uov_method · refiner_model · guidance_scale · sharpness · refiner_switch · seed · mixing_image_prompt_and_vary_upscale · enable_safety_checker · styles · loras · image_prompt_1 · image_prompt_2 · image_prompt_3 · image_prompt_4
默认

指定要排除的图像细节的负面提示词,包括颜色、物体、场景或更细致的特征。例如胡子、模糊或低分辨率。

performance 默认 Extreme Speed

性能选项:Speed 或 Quality。

output_format 默认 jpeg

结果图像的文件格式。

uov_method 默认 Vary (Strong)

用于放大或创建变体的方法。

默认 None

精修器选择:SDXL 或 SD 1.5。

默认 4

图像选择对提示词的遵循强度,以 CFG(Classifier Free Guidance)表示。

默认 2

输出图像的锐度设置。提高该值会使图像及其纹理更加锐利。

默认 0.8

精修器切换值:真实感 SD1.5 模型使用 0.4,动漫 SD1.5 模型使用 0.667,XL-refiners 使用 0.8。在两个 SDXL 模型之间切换时可使用任意值。

用于在 Stable Diffusion 中复现图像的种子。保持模型版本、提示词和种子不变,即可在每次运行中精确复现图像。

默认 ["Fooocus Enhance","F...

生成期间应用的风格。

默认 [{"path":"https://hug...

合并用于最终图像生成的 LoRA,最多 5 个 LoRA。

POST /run/fooocus/upscale-or-vary?wait=20 报价 → $0.007
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/fooocus/upscale-or-vary?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uov_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Fooocus Upscale or Vary

接收作为 `uov_image_url` 的源图像,并应用 `uov_method`:Vary (Subtle)、Vary (Strong)、Upscale (1.5x)、Upscale (2x) 或 Upscale (Fast 2x)。默认值为 Vary (Strong)。`prompt`、风格、LoRA 和可选图像提示词都可以引导结果,每次返回 1 到 4 张图像。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
prompt可选
类型string
默认值
描述要生成的图像;请尽可能提供详细信息以获得最佳结果。
negative_prompt可选
类型string
默认值
指定要排除的图像细节的负面提示词,包括颜色、物体、场景或更细致的特征。例如胡子、模糊或低分辨率。
styles可选
类型enum[]
默认值["Fooocus Enhance","Fooocus Sharp","Fooocus V2"]
生成期间应用的风格。
performance可选
类型enum
默认值Extreme Speed
SpeedQualityExtreme SpeedLightning
性能选项:Speed 或 Quality。
guidance_scale可选
类型number
默认值4
1 – 30
图像选择对提示词的遵循强度,以 CFG(Classifier Free Guidance)表示。
sharpness可选
类型number
默认值2
0 – 30
输出图像的锐度设置。提高该值会使图像及其纹理更加锐利。
aspect_ratio可选
类型string
默认值1024x1024
输出图像尺寸,可从预设中选择,或指定自定义宽度和高度。两个自定义尺寸都必须能被 8 整除。
num_images可选 num_outputs
类型integer
默认值1
1 – 4
每个请求生成的图像数量。
loras可选
类型object[]
默认值[{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}]
合并用于最终图像生成的 LoRA,最多 5 个 LoRA。
loras[].path必填
类型string
LoRA 权重的位置,以 URL 或路径指定。
loras[].scale可选
类型number
默认值0.1
0 – 1
LoRA 权重合并到基础模型前应用的乘数。
refiner_model可选
类型enum
默认值None
NonerealisticVisionV60B1_v51VAE.safetensors
精修器选择:SDXL 或 SD 1.5。
refiner_switch可选
类型number
默认值0.8
0 – 1
精修器切换值:真实感 SD1.5 模型使用 0.4,动漫 SD1.5 模型使用 0.667,XL-refiners 使用 0.8。在两个 SDXL 模型之间切换时可使用任意值。
output_format可选
类型enum
默认值jpeg
pngjpegwebp
结果图像的文件格式。
seed可选
类型integer | null
用于在 Stable Diffusion 中复现图像的种子。保持模型版本、提示词和种子不变,即可在每次运行中精确复现图像。
uov_image_url必填
类型url · image
用于放大或生成变体的源图像。
uov_method可选
类型enum
默认值Vary (Strong)
DisabledVary (Subtle)Vary (Strong)Upscale (1.5x)Upscale (2x)Upscale (Fast 2x)
用于放大或创建变体的方法。
image_prompt_1可选
类型object
image_prompt_1.type可选
类型enum
默认值ImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_1.image_url可选
类型url · image
image_prompt_1.stop_at可选
类型number
默认值0.5
0 – 1
image_prompt_1.weight可选
类型number
默认值1
0 – 2
image_prompt_2可选
类型object
image_prompt_2.type可选
类型enum
默认值ImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_2.image_url可选
类型url · image
image_prompt_2.stop_at可选
类型number
默认值0.5
0 – 1
image_prompt_2.weight可选
类型number
默认值1
0 – 2
image_prompt_3可选
类型object
image_prompt_3.type可选
类型enum
默认值ImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_3.image_url可选
类型url · image
image_prompt_3.stop_at可选
类型number
默认值0.5
0 – 1
image_prompt_3.weight可选
类型number
默认值1
0 – 2
image_prompt_4可选
类型object
image_prompt_4.type可选
类型enum
默认值ImagePrompt
ImagePromptPyraCannyCPDSFaceSwap
image_prompt_4.image_url可选
类型url · image
image_prompt_4.stop_at可选
类型number
默认值0.5
0 – 1
image_prompt_4.weight可选
类型number
默认值1
0 – 2
mixing_image_prompt_and_vary_upscale可选
类型boolean
默认值false
将 Image Prompt 与 Vary/Upscale 结合。
enable_safety_checker可选
类型boolean
默认值true
安全检查器开关;将其设置为 false 可禁用检查。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "fooocus/upscale-or-vary",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 7,
    "usd": "0.007",
    "charged": 7,
    "refunded": 0
  },
  "input": {
    "uov_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "timings": {},
    "has_nsfw_concepts": [
      false
    ]
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
images
array of object {url, content_type, file_name, file_size, width, height}生成图像的文件信息。
timings
object生成耗时。
has_nsfw_concepts
array of boolean指示生成的图像中是否出现 NSFW 概念。

更多模型:超分辨率

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/fooocus/upscale-or-vary.md. 所有模型和指南: https://doitong.com/developers/llms.txt