gconfig

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigPath = "./config.yaml"

Variables

This section is empty.

Functions

func ExtraModelGroup

func ExtraModelGroup() []string

func GROUP

func GROUP() string

func GROUPID

func GROUPID() int64

func GUIDE

func GUIDE() string

func GroupIndex2GroupName

func GroupIndex2GroupName(groupIndex int) string

func Load

func Load(configPath string) error

func MODELFILETONAME

func MODELFILETONAME(file string) string

func NewWatchConfig

func NewWatchConfig(ctx context.Context) *watchs

func Wathc added in v0.1.1

func Wathc()

Types

type Api

type Api struct {
	Url, Username, Password string
	Cached                  int
}

func API

func API() []Api

type Config

type Config struct {
	Api               []Api
	Model             []Model
	Embedding         []Embedding
	ExtraModel        []ExtraModel
	GroupID           int64
	Group             string
	Guide             string
	ControlPreProcess []ControlPreProcess
	ControlProcess    []ControlProcess
}

type ControlPreProcess

type ControlPreProcess struct {
	Name string
}

func PreProcess

func PreProcess() []ControlPreProcess

type ControlProcess

type ControlProcess struct {
	Name string
	File string
	Note string
}

func Name2Process

func Name2Process(name string) ControlProcess

func Process

func Process() []ControlProcess

type Embedding

type Embedding struct {
	Name    string
	NameExt string
	Type    uint
	Note    string
}

func ALLEmbedding

func ALLEmbedding() []Embedding

func EMBEDDING

func EMBEDDING() []Embedding

type ExtraModel

type ExtraModel struct {
	Name         string
	NameExt      string
	Preview      string
	Type         string
	TriggerWords []string
	Group        []string
}

func ALLExtraModel

func ALLExtraModel() []ExtraModel

func ExtraModelWithGroup

func ExtraModelWithGroup(group string) []ExtraModel

func GetExtraModel

func GetExtraModel(name string) (ExtraModel, error)

func GetExtraModelWithGroup

func GetExtraModelWithGroup(group, name string) (ExtraModel, error)

func GroupIndex2ExtraModels

func GroupIndex2ExtraModels(groupIndex int) []ExtraModel

func Index2ExtraModel

func Index2ExtraModel(GroupIndex, LoraIndex int) ExtraModel

type Model

type Model struct {
	Name     string
	File     string
	FileExt  string
	Vae      string
	VaeExt   string
	ClipSkip int
}

func ALLMODELS

func ALLMODELS() []Model

func MODELS

func MODELS() []Model

func Name2Model

func Name2Model(name string) Model

type SortEmbedding

type SortEmbedding []Embedding

func (SortEmbedding) Len

func (x SortEmbedding) Len() int

func (SortEmbedding) Less

func (x SortEmbedding) Less(i, j int) bool

func (SortEmbedding) Swap

func (x SortEmbedding) Swap(i, j int)

type SortExtraModel

type SortExtraModel []ExtraModel

func (SortExtraModel) Len

func (x SortExtraModel) Len() int

func (SortExtraModel) Less

func (x SortExtraModel) Less(i, j int) bool

func (SortExtraModel) Swap

func (x SortExtraModel) Swap(i, j int)

Jump to

Keyboard shortcuts

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