mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
@@ -288,7 +288,7 @@ def calculate_eye_position(face_bbox: dict) -> tuple:
|
||||
return (eye_x, eye_y)
|
||||
|
||||
|
||||
def draw_bounding_boxes(image: Image.Image, detections: list, points: list | None = None) -> Image.Image:
|
||||
def draw_bounding_boxes(image: Image.Image, detections: list, points: list | None = None) -> Image.Image | None:
|
||||
"""
|
||||
Draw bounding boxes and/or points on an image.
|
||||
|
||||
|
||||
@@ -270,7 +270,8 @@ class WaifuDiffusionTagger:
|
||||
character_count = 0
|
||||
rating_count = 0
|
||||
|
||||
for i, (tag_name, prob) in enumerate(zip(self.tags, probs, strict=False)):
|
||||
tags = self.tags or []
|
||||
for i, (tag_name, prob) in enumerate(zip(tags, probs, strict=False)):
|
||||
category = self.tag_categories[i]
|
||||
tag_lower = tag_name.lower()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user