zf-kbot/seedvr2
Run zf-kbot/seedvr2 with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| apikey |
string
|
|
API Key
|
| input_image |
string
|
输入图像
|
|
| target_megapixels |
number
|
3.6
Min: 2 Max: 100 |
目标像素(百万像素)
|
| ttp_switch |
boolean
|
False
|
是否分片
|
| tiles_per_row |
integer
|
3
Min: 3 Max: 10 |
每行分片数量
|
| short_pixels_after_tile |
integer
|
1024
Min: 512 Max: 4096 |
分片压缩后短边
|
| upscale_multiple_after_tile |
number
|
2
Min: 1 Max: 4 |
分片压缩放大比例
|
| website_name |
string
|
ImgUpscaler.AI
|
Website name for filename suffix
|
| image_filename |
string
|
test
|
Custom filename for the output (without extension)
|
| output_ext |
None
|
.jpg
|
输出图像格式
|
| quality |
integer
|
90
Min: 1 Max: 100 |
输出图像质量 (1-100)
|
| encode_tiled |
boolean
|
False
|
VAE 编码是否分片
|
| encode_tile_size |
integer
|
1536
Min: 512 Max: 2048 |
VAE 编码分片大小
|
| encode_tile_overlap |
integer
|
128
Max: 256 |
VAE 编码分片重叠
|
| decode_tiled |
boolean
|
True
|
VAE 解码是否分片
|
| decode_tile_size |
integer
|
1536
Min: 512 Max: 2048 |
VAE 解码分片大小
|
| decode_tile_overlap |
integer
|
128
Max: 256 |
VAE 解码分片重叠
|
| swap_io_components |
boolean
|
False
|
是否交换 IO 组件
|
| blocks_to_swap |
None
|
0
|
要交换的块数量,0/32
|
| offload_device |
None
|
cuda:0
|
模型 offload 设备 (none=不卸载, cpu=卸载到CPU启用缓存, cuda:0=卸载到GPU启用缓存)
|
| cache_model |
boolean
|
True
|
是否缓存模型 (需要 offload_device=cpu 才生效)
|
| upscale_method |
None
|
bicubic
|
缩放算法 (bicubic支持GPU加速,lanczos质量最好但仅CPU)
|
| resize_device |
None
|
gpu
|
图像缩放设备 (bicubic/bilinear支持gpu,lanczos仅cpu)
|
{
"type": "object",
"title": "Input",
"required": [
"input_image"
],
"properties": {
"apikey": {
"type": "string",
"title": "Apikey",
"default": "",
"x-order": 0,
"description": "API Key"
},
"quality": {
"type": "integer",
"title": "Quality",
"default": 90,
"maximum": 100,
"minimum": 1,
"x-order": 10,
"description": "\u8f93\u51fa\u56fe\u50cf\u8d28\u91cf (1-100)"
},
"output_ext": {
"enum": [
".png",
".webp",
".jpg"
],
"type": "string",
"title": "output_ext",
"description": "\u8f93\u51fa\u56fe\u50cf\u683c\u5f0f",
"default": ".jpg",
"x-order": 9
},
"ttp_switch": {
"type": "boolean",
"title": "Ttp Switch",
"default": false,
"x-order": 3,
"description": "\u662f\u5426\u5206\u7247"
},
"cache_model": {
"type": "boolean",
"title": "Cache Model",
"default": true,
"x-order": 20,
"description": "\u662f\u5426\u7f13\u5b58\u6a21\u578b (\u9700\u8981 offload_device=cpu \u624d\u751f\u6548)"
},
"input_image": {
"type": "string",
"title": "Input Image",
"format": "uri",
"x-order": 1,
"description": "\u8f93\u5165\u56fe\u50cf"
},
"decode_tiled": {
"type": "boolean",
"title": "Decode Tiled",
"default": true,
"x-order": 14,
"description": "VAE \u89e3\u7801\u662f\u5426\u5206\u7247"
},
"encode_tiled": {
"type": "boolean",
"title": "Encode Tiled",
"default": false,
"x-order": 11,
"description": "VAE \u7f16\u7801\u662f\u5426\u5206\u7247"
},
"website_name": {
"type": "string",
"title": "Website Name",
"default": "ImgUpscaler.AI",
"x-order": 7,
"description": "Website name for filename suffix"
},
"resize_device": {
"enum": [
"gpu",
"cpu"
],
"type": "string",
"title": "resize_device",
"description": "\u56fe\u50cf\u7f29\u653e\u8bbe\u5907 (bicubic/bilinear\u652f\u6301gpu\uff0clanczos\u4ec5cpu)",
"default": "gpu",
"x-order": 22
},
"tiles_per_row": {
"type": "integer",
"title": "Tiles Per Row",
"default": 3,
"maximum": 10,
"minimum": 3,
"x-order": 4,
"description": "\u6bcf\u884c\u5206\u7247\u6570\u91cf"
},
"blocks_to_swap": {
"enum": [
0,
32
],
"type": "integer",
"title": "blocks_to_swap",
"description": "\u8981\u4ea4\u6362\u7684\u5757\u6570\u91cf\uff0c0/32",
"default": 0,
"x-order": 18
},
"image_filename": {
"type": "string",
"title": "Image Filename",
"default": "test",
"x-order": 8,
"description": "Custom filename for the output (without extension)"
},
"offload_device": {
"enum": [
"none",
"cpu",
"cuda:0"
],
"type": "string",
"title": "offload_device",
"description": "\u6a21\u578b offload \u8bbe\u5907 (none=\u4e0d\u5378\u8f7d, cpu=\u5378\u8f7d\u5230CPU\u542f\u7528\u7f13\u5b58, cuda:0=\u5378\u8f7d\u5230GPU\u542f\u7528\u7f13\u5b58)",
"default": "cuda:0",
"x-order": 19
},
"upscale_method": {
"enum": [
"bicubic",
"lanczos",
"bilinear",
"nearest"
],
"type": "string",
"title": "upscale_method",
"description": "\u7f29\u653e\u7b97\u6cd5 (bicubic\u652f\u6301GPU\u52a0\u901f\uff0clanczos\u8d28\u91cf\u6700\u597d\u4f46\u4ec5CPU)",
"default": "bicubic",
"x-order": 21
},
"decode_tile_size": {
"type": "integer",
"title": "Decode Tile Size",
"default": 1536,
"maximum": 2048,
"minimum": 512,
"x-order": 15,
"description": "VAE \u89e3\u7801\u5206\u7247\u5927\u5c0f"
},
"encode_tile_size": {
"type": "integer",
"title": "Encode Tile Size",
"default": 1536,
"maximum": 2048,
"minimum": 512,
"x-order": 12,
"description": "VAE \u7f16\u7801\u5206\u7247\u5927\u5c0f"
},
"target_megapixels": {
"type": "number",
"title": "Target Megapixels",
"default": 3.6,
"maximum": 100,
"minimum": 2,
"x-order": 2,
"description": "\u76ee\u6807\u50cf\u7d20\uff08\u767e\u4e07\u50cf\u7d20\uff09"
},
"swap_io_components": {
"type": "boolean",
"title": "Swap Io Components",
"default": false,
"x-order": 17,
"description": "\u662f\u5426\u4ea4\u6362 IO \u7ec4\u4ef6"
},
"decode_tile_overlap": {
"type": "integer",
"title": "Decode Tile Overlap",
"default": 128,
"maximum": 256,
"minimum": 0,
"x-order": 16,
"description": "VAE \u89e3\u7801\u5206\u7247\u91cd\u53e0"
},
"encode_tile_overlap": {
"type": "integer",
"title": "Encode Tile Overlap",
"default": 128,
"maximum": 256,
"minimum": 0,
"x-order": 13,
"description": "VAE \u7f16\u7801\u5206\u7247\u91cd\u53e0"
},
"short_pixels_after_tile": {
"type": "integer",
"title": "Short Pixels After Tile",
"default": 1024,
"maximum": 4096,
"minimum": 512,
"x-order": 5,
"description": "\u5206\u7247\u538b\u7f29\u540e\u77ed\u8fb9"
},
"upscale_multiple_after_tile": {
"type": "number",
"title": "Upscale Multiple After Tile",
"default": 2,
"maximum": 4,
"minimum": 1,
"x-order": 6,
"description": "\u5206\u7247\u538b\u7f29\u653e\u5927\u6bd4\u4f8b"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Output"
}