mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 19:21:39 +00:00
diffirential guidance is WORKING (from what I can tell)
This commit is contained in:
@@ -779,11 +779,21 @@ class PoiFileItemDTOMixin:
|
||||
if self.poi not in json_data['poi']:
|
||||
raise Exception(f"Error: poi not found in caption file: {caption_path}")
|
||||
# poi has, x, y, width, height
|
||||
poi = json_data['poi'][self.poi]
|
||||
self.poi_x = int(poi['x'])
|
||||
self.poi_y = int(poi['y'])
|
||||
self.poi_width = int(poi['width'])
|
||||
self.poi_height = int(poi['height'])
|
||||
# do full image if no poi
|
||||
self.poi_x = 0
|
||||
self.poi_y = 0
|
||||
self.poi_width = self.width
|
||||
self.poi_height = self.height
|
||||
try:
|
||||
if self.poi in json_data['poi']:
|
||||
poi = json_data['poi'][self.poi]
|
||||
self.poi_x = int(poi['x'])
|
||||
self.poi_y = int(poi['y'])
|
||||
self.poi_width = int(poi['width'])
|
||||
self.poi_height = int(poi['height'])
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
|
||||
# handle flipping
|
||||
if kwargs.get('flip_x', False):
|
||||
|
||||
Reference in New Issue
Block a user