Prodia
This commit is contained in:
92
lib/rtypes/prodia_request.go
Normal file
92
lib/rtypes/prodia_request.go
Normal file
@@ -0,0 +1,92 @@
|
||||
package rtypes
|
||||
|
||||
type ProdiaAspectRatio string
|
||||
|
||||
const (
|
||||
Square = "square"
|
||||
Portrait = "portrait"
|
||||
Landscape = "landscape"
|
||||
)
|
||||
|
||||
type ProdiaModel string
|
||||
|
||||
const (
|
||||
SDV1_4 = "sdv1_4.ckpt [7460a6fa]"
|
||||
Pruned15 = "v1-5-pruned-emaonly.ckpt [81761151]"
|
||||
Anythingv3_0 = "anythingv3_0-pruned.ckpt [2700c435]"
|
||||
Anything = "anything-v4.5-pruned.ckpt [65745d25]"
|
||||
Analog = "analog-diffusion-1.0.ckpt [9ca13f02]"
|
||||
Theallys = "theallys-mix-ii-churned.safetensors [5d9225a4]"
|
||||
Elldreths = "elldreths-vivid-mix.safetensors [342d9d26]"
|
||||
Deliberate_v2 = "deliberate_v2.safetensors [10ec4b29]"
|
||||
Openjourney_V4 = "openjourney_V4.ckpt [ca2f377f]"
|
||||
Dreamlike1 = "dreamlike-diffusion-1.0.safetensors [5c9fd6e0]"
|
||||
Dreamlike2 = "dreamlike-diffusion-2.0.safetensors [fdcf65e7]"
|
||||
Portrait1 = "portrait+1.0.safetensors [1400e684]"
|
||||
Riffusion = "riffusion-model-v1.ckpt [3aafa6fe]"
|
||||
Timeless = "timeless-1.0.ckpt [7c4971d4]"
|
||||
Dreamshaper_5BakedVae = "dreamshaper_5BakedVae.safetensors [a3fbf318]"
|
||||
RevAnimated_v122 = "revAnimated_v122.safetensors [3f4fefd9]"
|
||||
Meinamix_meinaV9 = "meinamix_meinaV9.safetensors [2ec66ab0]"
|
||||
Lyriel_v15 = "lyriel_v15.safetensors [65d547c5]"
|
||||
)
|
||||
|
||||
type ProdiaSampler string
|
||||
|
||||
const (
|
||||
Euler = "Euler"
|
||||
EulerA = "Euler a"
|
||||
Heun = "Heun"
|
||||
DPMpp2MK = "DPM++ 2M Karras"
|
||||
)
|
||||
|
||||
type ProdiaGenerateRequest struct {
|
||||
Model ProdiaModel `json:"model"`
|
||||
Prompt ProdiaSampler `json:"prompt"`
|
||||
NegativePrompt string `json:"negative_prompt"`
|
||||
Steps int `json:"steps"`
|
||||
CFGScale float32 `json:"cfg_scale"`
|
||||
Seed int64 `json:"seed"`
|
||||
Upscale bool `json:"upscale"`
|
||||
Sampler string `json:"sampler"`
|
||||
AspectRatio ProdiaAspectRatio `json:"aspect_ratio"`
|
||||
}
|
||||
|
||||
type ProdiaGenerateResponseParamOptions struct {
|
||||
SDModelCheckpoint string `json:"sd_model_checkpoint"`
|
||||
}
|
||||
|
||||
type ProdiaGenerateResponseParams struct {
|
||||
Model string `json:"model"`
|
||||
Prompt string `json:"prompt"`
|
||||
NegativePrompt string `json:"negative_prompt"`
|
||||
Steps int `json:"steps"`
|
||||
CFGScale float32 `json:"cfg_scale"`
|
||||
Seed int64 `json:"seed"`
|
||||
Upscale bool `json:"upscale"`
|
||||
Sampler string `json:"sampler"`
|
||||
AspectRatio string `json:"aspect_ratio"`
|
||||
Options ProdiaGenerateResponseParamOptions `json:"options"`
|
||||
}
|
||||
|
||||
type ProdiaGenerateResponse struct {
|
||||
Job string `json:"job"`
|
||||
Status string `json:"status"`
|
||||
Params ProdiaGenerateResponseParams `json:"params"`
|
||||
}
|
||||
|
||||
type ProdiaRetrieveRequest struct {
|
||||
JobID string `json:"jobid"`
|
||||
}
|
||||
|
||||
type ProdiaRetrieveResponse struct {
|
||||
Job string `json:"job"`
|
||||
Status string `json:"status"`
|
||||
ImageUrl string `json:"imageUrl"`
|
||||
Params ProdiaGenerateResponseParams `json:"params"`
|
||||
}
|
||||
|
||||
type ProdiaRetrieveResponseX struct {
|
||||
Images []string `json:"images"`
|
||||
Info string `json:"info"`
|
||||
}
|
||||
Reference in New Issue
Block a user