barreloflube
commited on
Commit
·
6324529
1
Parent(s):
0e222e0
Refactor UI structure and add arbitrary types support
Browse files- src/tasks/images/sd.py +9 -0
src/tasks/images/sd.py
CHANGED
@@ -61,15 +61,24 @@ class SDReq(BaseModel):
|
|
61 |
vae: bool = True
|
62 |
controlnet_config: Optional[ControlNetReq] = None
|
63 |
photomaker_images: Optional[List[Image.Image]] = None
|
|
|
|
|
|
|
64 |
|
65 |
|
66 |
class SDImg2ImgReq(SDReq):
|
67 |
image: Image.Image
|
68 |
strength: float = 1.0
|
|
|
|
|
|
|
69 |
|
70 |
|
71 |
class SDInpaintReq(SDImg2ImgReq):
|
72 |
mask_image: Image.Image
|
|
|
|
|
|
|
73 |
|
74 |
|
75 |
# Helper functions
|
|
|
61 |
vae: bool = True
|
62 |
controlnet_config: Optional[ControlNetReq] = None
|
63 |
photomaker_images: Optional[List[Image.Image]] = None
|
64 |
+
|
65 |
+
class Config:
|
66 |
+
arbitrary_types_allowed=True
|
67 |
|
68 |
|
69 |
class SDImg2ImgReq(SDReq):
|
70 |
image: Image.Image
|
71 |
strength: float = 1.0
|
72 |
+
|
73 |
+
class Config:
|
74 |
+
arbitrary_types_allowed=True
|
75 |
|
76 |
|
77 |
class SDInpaintReq(SDImg2ImgReq):
|
78 |
mask_image: Image.Image
|
79 |
+
|
80 |
+
class Config:
|
81 |
+
arbitrary_types_allowed=True
|
82 |
|
83 |
|
84 |
# Helper functions
|