scale

package
v1.2.5-beta3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

README

scale

采用叔叔的模型放大二次元图片

API

必要参数

GET https://sayuri.fumiama.top/scale/?url=图片链接

可选参数

model=[conservative, no-denoise, denoise1x, denoise2x, denoise3x]

scale=[2, 3, 4]

tile=[0, 1, 2, 3, 4]

特别地,scale=[3, 4]时没有模型[denoise1x, denoise2x]

返回:webp格式的输出图片

效果

输入 输出

Documentation

Index

Constants

View Source
const (
	ModelConservative = "conservative"
	ModelNoDenoise    = "no-denoise"
	ModelDenoise1x    = "denoise1x"
	ModelDenoise2x    = "denoise2x"
	ModelDenoise3x    = "denoise3x"
)

Variables

View Source
var (
	Models      = [...]string{ModelConservative, ModelNoDenoise, ModelDenoise1x, ModelDenoise2x, ModelDenoise3x}
	ErrInvModel = errors.New("invaild model")
	ErrInvScale = errors.New("invaild scale")
	ErrInvTile  = errors.New("invaild tile")
)

Functions

func Get

func Get(u string, model, scale, tile int) ([]byte, error)

Get model 0-4, scale 2-4, tile 0-4

func Post

func Post(body io.Reader, model, scale, tile int) ([]byte, error)

Post model 0-4, scale 2-4, tile 0-4

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL