Add ability to set transparent color for control images

This commit is contained in:
Jaret Burkett
2025-09-02 11:08:44 -06:00
parent 85dcae6e2b
commit f699f4be5f
3 changed files with 16 additions and 2 deletions

View File

@@ -814,6 +814,9 @@ class DatasetConfig:
self.control_path: Union[str,List[str]] = kwargs.get('control_path', None) # depth maps, etc
if self.control_path == '':
self.control_path = None
# color for transparent reigon of control images with transparency
self.control_transparent_color: List[int] = kwargs.get('control_transparent_color', [0, 0, 0])
# inpaint images should be webp/png images with alpha channel. The alpha 0 (invisible) section will
# be the part conditioned to be inpainted. The alpha 1 (visible) section will be the part that is ignored
self.inpaint_path: Union[str,List[str]] = kwargs.get('inpaint_path', None)