feat: support upscaled image generation with esrgan (#509)

This commit is contained in:
Ettore Di Giacinto 2023-06-05 17:21:38 +02:00 committed by GitHub
parent ec4fd1d219
commit b447a2a719
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View file

@ -8,6 +8,18 @@ import (
)
func GenerateImage(height, width, mode, step, seed int, positive_prompt, negative_prompt, dst, asset_dir string) error {
if height > 512 || width > 512 {
return stableDiffusion.GenerateImageUpscaled(
height,
width,
step,
seed,
positive_prompt,
negative_prompt,
dst,
asset_dir,
)
}
return stableDiffusion.GenerateImage(
height,
width,