Annotate with types for pydantic

This commit is contained in:
cmdr2 2024-12-11 11:47:18 +05:30
parent 74b05022f4
commit 77a9226720

View File

@ -20,8 +20,8 @@ class GenerateImageRequest(BaseModel):
control_image: Any = None control_image: Any = None
control_alpha: Union[float, List[float]] = None control_alpha: Union[float, List[float]] = None
prompt_strength: float = 0.8 prompt_strength: float = 0.8
preserve_init_image_color_profile = False preserve_init_image_color_profile: bool = False
strict_mask_border = False strict_mask_border: bool = False
sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms" sampler_name: str = None # "ddim", "plms", "heun", "euler", "euler_a", "dpm2", "dpm2_a", "lms"
hypernetwork_strength: float = 0 hypernetwork_strength: float = 0
@ -100,7 +100,7 @@ class MergeRequest(BaseModel):
model1: str = None model1: str = None
ratio: float = None ratio: float = None
out_path: str = "mix" out_path: str = "mix"
use_fp16 = True use_fp16: bool = True
class Image: class Image: