File size: 542 Bytes
19a1abb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from adapt_sd import StableDiffusion

from my.config import BaseConf


class SD(BaseConf):
    """Stable Diffusion"""
    variant:        str = "v1"
    v2_highres:     bool = False
    prompt:         str = "a photograph of an astronaut riding a horse"
    scale:          float = 3.0  # classifier free guidance scale
    precision:      str = 'autocast'
    dir:            str = './'
    alpha:          float = 0.0 # merge scale

    def make(self):
        args = self.dict()
        model = StableDiffusion(**args)
        return model