opts

package
v0.0.0-...-c9557dd Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GGML_TYPE_F32      WType = 0
	GGML_TYPE_F16            = 1
	GGML_TYPE_Q4_0           = 2
	GGML_TYPE_Q4_1           = 3
	GGML_TYPE_Q5_0           = 6
	GGML_TYPE_Q5_1           = 7
	GGML_TYPE_Q8_0           = 8
	GGML_TYPE_Q8_1           = 9
	GGML_TYPE_Q2_K           = 10
	GGML_TYPE_Q3_K           = 11
	GGML_TYPE_Q4_K           = 12
	GGML_TYPE_Q5_K           = 13
	GGML_TYPE_Q6_K           = 14
	GGML_TYPE_Q8_K           = 15
	GGML_TYPE_IQ2_XXS        = 16
	GGML_TYPE_IQ2_XS         = 17
	GGML_TYPE_IQ3_XXS        = 18
	GGML_TYPE_IQ1_S          = 19
	GGML_TYPE_IQ4_NL         = 20
	GGML_TYPE_IQ3_S          = 21
	GGML_TYPE_IQ2_S          = 22
	GGML_TYPE_IQ4_XS         = 23
	GGML_TYPE_I8             = 24
	GGML_TYPE_I16            = 25
	GGML_TYPE_I32            = 26
	GGML_TYPE_I64            = 27
	GGML_TYPE_F64            = 28
	GGML_TYPE_IQ1_M          = 29
	GGML_TYPE_BF16           = 30
	GGML_TYPE_Q4_0_4_4       = 31
	GGML_TYPE_Q4_0_4_8       = 32
	GGML_TYPE_Q4_0_8_8       = 33
	GGML_TYPE_COUNT          = 34
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generation

type Generation struct {
	Width     int
	Height    int
	Seed      int64
	OutputDir string
	// contains filtered or unexported fields
}

func NewGeneration

func NewGeneration(in *Options) *Generation

func (*Generation) AddFilename

func (gen *Generation) AddFilename(filename string)

func (*Generation) GetFilenames

func (gen *Generation) GetFilenames() []string

func (*Generation) OneDone

func (gen *Generation) OneDone()

type Options

type Options struct {
	VaePath       string `json:"vae_path"`        //
	UseVae        bool   `json:"use_vae"`         //
	VaeDecodeOnly bool   `json:"vae_decode_only"` //
	VaeTiling     bool   `json:"vae_tiling"`      //

	LoraModelDir          string   `json:"lora_model_dir"`          //
	FreeParamsImmediately bool     `json:"free_params_immediately"` //
	WType                 WType    `json:"w_type"`                  //
	RngType               RNGType  `json:"rng_type"`                //
	Schedule              Schedule `json:"schedule,string"`         //
	GpuEnable             bool     `json:"gpu_enable"`              //
	Debug                 bool     `json:"debug"`                   //
	ReloadModel           bool     `json:"reload_model"`            //

	// Ex Params
	ModelPath     string `json:"model_path"`
	FluxModelPath string `json:"flux_model_path"`
	ClipLPath     string `json:"clip_l_path"`
	T5xxlPath     string `json:"t5xxl_path"`

	UpscalePath    string `json:"upscale_path"`
	WithUpscale    bool   `json:"with_upscale"`
	DeleteUpscaled bool   `json:"delete_upscaled"`

	WithStepsPreview bool `json:"with_steps_preview"`

	OutputDir    string `json:"-"`
	WriteLastReq bool   `json:"write_last_req"`

	Prompt           string           `json:"prompt"`
	NegativePrompt   string           `json:"negative_prompt"`
	ClipSkip         int              `json:"clip_skip,string"`
	CfgScale         float32          `json:"cfg_scale,string"`
	Width            int              `json:"width,string"`
	Height           int              `json:"height,string"`
	SampleMethod     SampleMethod     `json:"sample_method,string"`
	SampleSteps      int              `json:"sample_steps,string"`
	Seed             int64            `json:"seed,string"`
	BatchCount       int              `json:"batch_count,string"`
	OutputsImageType OutputsImageType `json:"outputs_image_type"`

	Lora string `json:"lora"`

	UseModelSD   bool `json:"use_model_sd"`   //
	UseModelFlux bool `json:"use_model_flux"` //
}

type OutputsImageType

type OutputsImageType string
const (
	PNG  OutputsImageType = "PNG"
	JPEG                  = "JPEG"
)

type RNGType

type RNGType uint8
const (
	STD_DEFAULT_RNG RNGType = iota
	CUDA_RNG
)

type SampleMethod

type SampleMethod uint8
const (
	EULER_A SampleMethod = iota
	EULER
	HEUN
	DPM2
	DPMPP2S_A
	DPMPP2M
	DPMPP2Mv2
	LCM
	N_SAMPLE_METHODS
)

type Schedule

type Schedule uint8
const (
	DEFAULT Schedule = iota
	DISCRETE
	KARRAS
	N_SCHEDULES
)

type WType

type WType uint8

Jump to

Keyboard shortcuts

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