2023-02-11 04:41:24 +00:00
|
|
|
$id: https://github.com/ssube/onnx-web/blob/main/api/schemas/extras.yaml
|
|
|
|
$schema: https://json-schema.org/draft/2020-12/schema
|
|
|
|
|
|
|
|
$defs:
|
|
|
|
legacy_tuple:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
oneOf:
|
2023-02-11 05:06:30 +00:00
|
|
|
- type: boolean
|
2023-02-11 04:41:24 +00:00
|
|
|
- type: number
|
2023-02-11 05:06:30 +00:00
|
|
|
- type: string
|
2023-02-11 04:41:24 +00:00
|
|
|
|
2023-11-12 21:15:06 +00:00
|
|
|
tensor_format:
|
|
|
|
type: string
|
2023-12-17 04:49:29 +00:00
|
|
|
enum: [bin, ckpt, onnx, pt, pth, safetensors, zip]
|
2023-11-12 21:15:06 +00:00
|
|
|
|
|
|
|
embedding_network:
|
2023-03-18 12:40:57 +00:00
|
|
|
type: object
|
|
|
|
required: [name, source]
|
|
|
|
properties:
|
2023-11-12 21:15:06 +00:00
|
|
|
format:
|
2023-11-12 21:19:04 +00:00
|
|
|
$ref: "#/$defs/tensor_format"
|
2023-11-12 21:15:06 +00:00
|
|
|
label:
|
|
|
|
type: string
|
|
|
|
model:
|
|
|
|
type: string
|
|
|
|
enum: [concept, embeddings]
|
2023-03-18 12:40:57 +00:00
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
source:
|
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
token:
|
2023-03-18 12:40:57 +00:00
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
type:
|
|
|
|
type: string
|
|
|
|
const: inversion # TODO: add embedding
|
2023-03-18 12:40:57 +00:00
|
|
|
weight:
|
|
|
|
type: number
|
|
|
|
|
2023-11-12 21:15:06 +00:00
|
|
|
lora_network:
|
2023-02-22 03:40:57 +00:00
|
|
|
type: object
|
2023-11-12 21:15:06 +00:00
|
|
|
required: [name, source, type]
|
2023-02-22 03:40:57 +00:00
|
|
|
properties:
|
2023-11-12 21:15:06 +00:00
|
|
|
label:
|
2023-02-22 03:40:57 +00:00
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
model:
|
2023-02-22 03:40:57 +00:00
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
enum: [cloneofsimo, sd-scripts]
|
|
|
|
name:
|
2023-03-03 05:32:20 +00:00
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
source:
|
2023-03-05 04:57:31 +00:00
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
tokens:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
type:
|
2023-03-03 05:32:20 +00:00
|
|
|
type: string
|
2023-11-12 21:15:06 +00:00
|
|
|
const: lora
|
2023-03-18 12:40:57 +00:00
|
|
|
weight:
|
|
|
|
type: number
|
2023-02-22 03:40:57 +00:00
|
|
|
|
2023-02-11 04:41:24 +00:00
|
|
|
base_model:
|
|
|
|
type: object
|
|
|
|
required: [name, source]
|
|
|
|
properties:
|
|
|
|
format:
|
2023-11-12 21:19:04 +00:00
|
|
|
$ref: "#/$defs/tensor_format"
|
2023-02-11 04:41:24 +00:00
|
|
|
half:
|
|
|
|
type: boolean
|
2023-03-05 04:57:31 +00:00
|
|
|
label:
|
|
|
|
type: string
|
2023-02-11 04:41:24 +00:00
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
opset:
|
|
|
|
type: number
|
|
|
|
source:
|
|
|
|
type: string
|
|
|
|
|
|
|
|
correction_model:
|
|
|
|
allOf:
|
|
|
|
- $ref: "#/$defs/base_model"
|
2023-04-10 22:49:56 +00:00
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
model:
|
2023-04-10 22:59:32 +00:00
|
|
|
type: string
|
2023-04-10 22:49:56 +00:00
|
|
|
enum: [
|
|
|
|
codeformer,
|
|
|
|
gfpgan
|
|
|
|
]
|
2023-02-11 04:41:24 +00:00
|
|
|
|
|
|
|
diffusion_model:
|
|
|
|
allOf:
|
|
|
|
- $ref: "#/$defs/base_model"
|
2023-02-12 20:10:30 +00:00
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
config:
|
|
|
|
type: string
|
2023-06-27 00:18:20 +00:00
|
|
|
hash:
|
|
|
|
type: string
|
2023-04-30 03:56:52 +00:00
|
|
|
image_size:
|
|
|
|
type: number
|
2023-02-22 03:40:57 +00:00
|
|
|
inversions:
|
|
|
|
type: array
|
|
|
|
items:
|
2023-11-12 21:15:06 +00:00
|
|
|
$ref: "#/$defs/embedding_network"
|
2023-03-18 12:40:57 +00:00
|
|
|
loras:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: "#/$defs/lora_network"
|
2023-04-28 04:41:04 +00:00
|
|
|
pipeline:
|
|
|
|
type: string
|
|
|
|
enum: [
|
2023-12-17 04:49:29 +00:00
|
|
|
archive,
|
2023-05-01 02:23:44 +00:00
|
|
|
controlnet,
|
|
|
|
img2img,
|
|
|
|
inpaint,
|
|
|
|
lpw,
|
|
|
|
panorama,
|
|
|
|
pix2pix,
|
|
|
|
txt2img,
|
2023-09-24 15:12:40 +00:00
|
|
|
txt2img-sdxl,
|
2023-05-01 02:23:44 +00:00
|
|
|
upscale,
|
2023-04-28 04:41:04 +00:00
|
|
|
]
|
2023-02-17 02:55:05 +00:00
|
|
|
vae:
|
|
|
|
type: string
|
2023-04-30 03:56:52 +00:00
|
|
|
version:
|
|
|
|
type: string
|
|
|
|
enum: [
|
|
|
|
v1,
|
|
|
|
v2,
|
|
|
|
v2.1,
|
|
|
|
]
|
2023-02-11 04:41:24 +00:00
|
|
|
|
|
|
|
upscaling_model:
|
|
|
|
allOf:
|
|
|
|
- $ref: "#/$defs/base_model"
|
|
|
|
- type: object
|
|
|
|
required: [scale]
|
|
|
|
properties:
|
2023-04-10 22:49:56 +00:00
|
|
|
model:
|
2023-04-10 22:59:32 +00:00
|
|
|
type: string
|
2023-04-10 22:49:56 +00:00
|
|
|
enum: [
|
|
|
|
bsrgan,
|
|
|
|
resrgan,
|
|
|
|
swinir
|
|
|
|
]
|
2023-02-11 04:41:24 +00:00
|
|
|
scale:
|
|
|
|
type: number
|
|
|
|
|
2023-02-17 01:01:26 +00:00
|
|
|
source_model:
|
|
|
|
type: object
|
|
|
|
required: [name, source]
|
|
|
|
properties:
|
2023-04-15 21:55:53 +00:00
|
|
|
dest:
|
|
|
|
type: string
|
2023-02-17 01:01:26 +00:00
|
|
|
format:
|
|
|
|
type: string
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
source:
|
|
|
|
type: string
|
|
|
|
|
2023-03-05 13:53:23 +00:00
|
|
|
translation:
|
|
|
|
type: object
|
|
|
|
additionalProperties: False
|
|
|
|
patternProperties:
|
|
|
|
"(\\w|\\.|-)+":
|
|
|
|
oneOf:
|
|
|
|
- type: string
|
|
|
|
- $ref: "#/$defs/translation"
|
|
|
|
|
2023-02-11 04:41:24 +00:00
|
|
|
type: object
|
|
|
|
additionalProperties: False
|
|
|
|
properties:
|
|
|
|
diffusion:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
oneOf:
|
|
|
|
- $ref: "#/$defs/legacy_tuple"
|
|
|
|
- $ref: "#/$defs/diffusion_model"
|
|
|
|
correction:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
oneOf:
|
|
|
|
- $ref: "#/$defs/legacy_tuple"
|
|
|
|
- $ref: "#/$defs/correction_model"
|
2023-03-18 12:40:57 +00:00
|
|
|
networks:
|
2023-02-11 04:41:24 +00:00
|
|
|
type: array
|
2023-03-18 15:24:16 +00:00
|
|
|
items:
|
2023-11-12 21:15:06 +00:00
|
|
|
oneOf:
|
|
|
|
- $ref: "#/$defs/lora_network"
|
|
|
|
- $ref: "#/$defs/embedding_network"
|
2023-02-17 01:01:26 +00:00
|
|
|
sources:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
oneOf:
|
|
|
|
- $ref: "#/$defs/legacy_tuple"
|
2023-03-05 04:57:31 +00:00
|
|
|
- $ref: "#/$defs/source_model"
|
|
|
|
strings:
|
|
|
|
type: object
|
2023-03-05 13:53:23 +00:00
|
|
|
additionalProperties: False
|
|
|
|
patternProperties:
|
|
|
|
"^\\w\\w$":
|
2023-03-18 12:40:57 +00:00
|
|
|
$ref: "#/$defs/translation"
|
|
|
|
upscaling:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
oneOf:
|
|
|
|
- $ref: "#/$defs/legacy_tuple"
|
|
|
|
- $ref: "#/$defs/upscaling_model"
|