You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
507 B
20 lines
507 B
package stablediffusion
|
|
|
|
import "os"
|
|
|
|
type StableDiffusion struct {
|
|
assetDir string
|
|
}
|
|
|
|
func New(assetDir string) (*StableDiffusion, error) {
|
|
if _, err := os.Stat(assetDir); err != nil {
|
|
return nil, err
|
|
}
|
|
return &StableDiffusion{
|
|
assetDir: assetDir,
|
|
}, nil
|
|
}
|
|
|
|
func (s *StableDiffusion) GenerateImage(height, width, mode, step, seed int, positive_prompt, negative_prompt, dst string) error {
|
|
return GenerateImage(height, width, mode, step, seed, positive_prompt, negative_prompt, dst, s.assetDir)
|
|
}
|
|
|