mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-03 09:24:59 +00:00
feat: add image generation with ncnn-stablediffusion (#272)
This commit is contained in:
parent
acd03d15f2
commit
9d051c5d4f
17 changed files with 582 additions and 58 deletions
23
pkg/stablediffusion/generate.go
Normal file
23
pkg/stablediffusion/generate.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
//go:build stablediffusion
|
||||
// +build stablediffusion
|
||||
|
||||
package stablediffusion
|
||||
|
||||
import (
|
||||
stableDiffusion "github.com/mudler/go-stable-diffusion"
|
||||
)
|
||||
|
||||
func GenerateImage(height, width, mode, step, seed int, positive_prompt, negative_prompt, dst, asset_dir string) error {
|
||||
return stableDiffusion.GenerateImage(
|
||||
height,
|
||||
width,
|
||||
mode,
|
||||
step,
|
||||
seed,
|
||||
positive_prompt,
|
||||
negative_prompt,
|
||||
dst,
|
||||
"",
|
||||
asset_dir,
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue