mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-18 20:27:57 +00:00
cae7b197ec
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
21 lines
467 B
Go
21 lines
467 B
Go
package tinydream
|
|
|
|
import "os"
|
|
|
|
type TinyDream struct {
|
|
assetDir string
|
|
}
|
|
|
|
func New(assetDir string) (*TinyDream, error) {
|
|
if _, err := os.Stat(assetDir); err != nil {
|
|
return nil, err
|
|
}
|
|
return &TinyDream{
|
|
assetDir: assetDir,
|
|
}, nil
|
|
}
|
|
|
|
func (td *TinyDream) GenerateImage(height, width, step, seed int, positive_prompt, negative_prompt, dst string) error {
|
|
return GenerateImage(height, width, step, seed, positive_prompt, negative_prompt, dst, td.assetDir)
|
|
}
|