Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinDir ¶
func BinDir() string
BinDir returns the directory where llmconfig manages stable-diffusion.cpp binaries.
func FindBinary ¶
FindBinary returns the path to the sd-cli binary, preferring the managed bin dir.
func FindServer ¶
FindServer returns the path to the sd-server binary, preferring the managed bin dir. It deliberately does NOT fall back to sd-cli: `up` launches this path with server-only flags, and starting sd-cli with those flags just fails confusingly.
func Install ¶
func Install(asset *GithubAsset, onProgress func(downloaded, total int64)) error
Install downloads and extracts a release asset into BinDir(). onProgress is called with (downloaded, total) bytes.
Types ¶
type GithubAsset ¶
type GithubAsset struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
Size int64 `json:"size"`
}
func PickAsset ¶
func PickAsset(rel *GithubRelease, backend string) (*GithubAsset, error)
PickAsset selects the best release asset for the current OS/arch/backend. backend: "cuda", "metal", "cpu", "" (auto-detect)
type GithubRelease ¶
type GithubRelease struct {
TagName string `json:"tag_name"`
Assets []GithubAsset `json:"assets"`
}
func LatestRelease ¶
func LatestRelease() (*GithubRelease, error)
LatestRelease fetches the latest stable-diffusion.cpp release metadata from GitHub.
func ReleaseByTag ¶
func ReleaseByTag(tag string) (*GithubRelease, error)
ReleaseByTag fetches release metadata for a specific stable-diffusion.cpp tag from GitHub.