Added ability to add masks to dataloader and sd trainer to adjust weight of image

This commit is contained in:
Jaret Burkett
2023-10-09 11:21:00 -06:00
parent 1d3de678aa
commit bb1d3793e3
4 changed files with 127 additions and 14 deletions

View File

@@ -235,6 +235,7 @@ class DatasetConfig:
self.flip_y: bool = kwargs.get('flip_y', False)
self.augments: List[str] = kwargs.get('augments', [])
self.control_path: str = kwargs.get('control_path', None) # depth maps, etc
self.mask_path: str = kwargs.get('mask_path', None) # focus mask (black and white. White has higher loss than black)
self.poi: Union[str, None] = kwargs.get('poi', None) # if one is set and in json data, will be used as auto crop scale point of interes
# cache latents will store them in memory