Documentation
¶
Overview ¶
Package cmd implements the malina CLI subcommands (install, system, model, sd, info) wired into urfave/cli.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var InstallCmd = &cli.Command{ Name: "install", Usage: "Install stable-diffusion.cpp libraries used by malina", Flags: []cli.Flag{ &cli.StringFlag{ Name: "version", Aliases: []string{"v"}, Usage: `version of stable-diffusion.cpp to install (e.g. "master-656-0e4ee04"; default is the malina-pinned version, pass "latest" to query the GitHub releases API)`, Value: "", }, &cli.StringFlag{ Name: "lib", Aliases: []string{"l"}, Usage: "path to stable-diffusion.cpp compiled library files", EnvVars: []string{"MALINA_LIB"}, }, &cli.StringFlag{ Name: "processor", Aliases: []string{"p"}, Usage: "backend to use (cpu, cuda, metal, vulkan, rocm)", Value: "", }, &cli.StringFlag{ Name: "os", Usage: "operating system to install for (linux, windows, darwin)", Value: runtime.GOOS, }, &cli.BoolFlag{ Name: "upgrade", Aliases: []string{"u"}, Usage: "upgrade existing installation", Value: false, }, &cli.BoolFlag{ Name: "quiet", Aliases: []string{"q"}, Usage: "suppress output during installation", Value: false, }, }, Action: func(c *cli.Context) error { return runInstall(c) }, }
InstallCmd installs stable-diffusion.cpp shared libraries into a local directory.
var ModelCmd = &cli.Command{ Name: "model", Usage: "Manage stable-diffusion model bundles", Subcommands: []*cli.Command{ modelListCmd, modelInfoCmd, modelPullCmd, }, }
ModelCmd manages stable-diffusion model bundles (list / info / pull).
A "bundle" is the set of files (diffusion model, VAE, text encoders, etc.) that stable-diffusion.cpp needs to construct a single Context. Curation lives in pkg/download/bundle.go; kronk and other downstream consumers may layer their own catalog on top of this one.
var SDCmd = &cli.Command{ Name: "sd", Usage: "Run stable-diffusion.cpp commands", Subcommands: []*cli.Command{ sdEncodeCmd, }, }
SDCmd groups stable-diffusion subcommands under "malina sd". Subcommand implementations for generation (txt2img, img2img) land in follow-on milestones.
var SystemCmd = &cli.Command{ Name: "system", Usage: "Show stable-diffusion.cpp / system information", Flags: []cli.Flag{ &cli.StringFlag{ Name: "lib", Aliases: []string{"l"}, Usage: "path to stable-diffusion.cpp compiled library files", EnvVars: []string{"MALINA_LIB"}, }, }, Action: func(c *cli.Context) error { return runSystemInfo(c) }, }
SystemCmd shows information about the host environment and the loaded stable-diffusion.cpp library.
Functions ¶
Types ¶
This section is empty.