| # resolution.py - Smart Resolution Management | |
| # FROZEN - DO NOT MODIFY | |
| class ResolutionManager: | |
| """Category-appropriate inference resolution - FROZEN.""" | |
| RECOMMENDED = { | |
| 'simple_graphic': 600, | |
| 'human_hair': 1024, | |
| 'human': 1024, | |
| 'anime': 800, | |
| 'logo_icon': 600, | |
| 'product_white_bg': 700, | |
| 'general_photo': 1024, | |
| 'complex': 1024 | |
| } | |
| def get_resolution(cls, category: str, original_size: tuple) -> int: | |
| base = cls.RECOMMENDED.get(category, 1024) | |
| if max(original_size) < base: | |
| return max(original_size) | |
| return base |