infrastructure

package
v0.0.0-...-811d298 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxtFilename  = "list.txt"
	ImageWidth   = 720
	ImageHeight  = 1080
	ImageSteps   = 50
	ImageUpscale = 4
)

стандартные параметры генерации, отлаженные на RTX3060 12Gb

View Source
const ReadTimeoutSeconds = 5

Variables

This section is empty.

Functions

func InitDB

func InitDB(ctx context.Context, dns string) *gorm.DB

Types

type AI

type AI struct {
	// contains filtered or unexported fields
}

AI - обёртка над Invoke.AI (который обёртка над Stable Diffusion), дающая создание картинок по prompt

func NewAI

func NewAI(invokeAIPath string) *AI

func (*AI) GenerateImage

func (ai *AI) GenerateImage(ctx context.Context, seed uint, prompt string) ([]byte, error)

type Config

type Config struct {
	// базовые параметры
	IsDebug      bool
	InvokeAIPath string
	DbDSN        string

	// hardware
	WebcamDeviceID        string
	WebcamFrameResolution string

	// службы
	CreatorActive bool
}

func InitEnv

func InitEnv() *Config

type Webcam

type Webcam struct {
	// contains filtered or unexported fields
}

func NewWebcam

func NewWebcam(deviceID string, resolution string) *Webcam

func (*Webcam) Start

func (w *Webcam) Start(ctx context.Context, outputCh chan image.Image) error

Jump to

Keyboard shortcuts

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