File size: 872 Bytes
6bcacf9
 
 
8c39361
 
 
 
 
 
6bcacf9
 
 
 
8c39361
 
 
 
 
 
6bcacf9
8c39361
6bcacf9
 
 
8c39361
6bcacf9
 
 
8c39361
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from typing import Optional

from pydantic import BaseModel
from constants import LCM_DEFAULT_MODEL, LCM_DEFAULT_MODEL_OPENVINO


class LCMLora(BaseModel):
    base_model_id: str = ""
    lcm_lora_id: str = ""


class LCMDiffusionSetting(BaseModel):
    lcm_model_id: str = LCM_DEFAULT_MODEL
    openvino_lcm_model_id: str = LCM_DEFAULT_MODEL_OPENVINO
    use_offline_model: bool = False
    use_lcm_lora: bool = False
    lcm_lora: Optional[LCMLora] = LCMLora()
    use_tiny_auto_encoder: bool = False
    use_openvino: bool = False
    prompt: str = ""
    negative_prompt: str = ""
    image_height: Optional[int] = 512
    image_width: Optional[int] = 512
    inference_steps: Optional[int] = 4
    guidance_scale: Optional[float] = 1
    number_of_images: Optional[int] = 1
    seed: Optional[int] = -1
    use_seed: bool = False
    use_safety_checker: bool = False