File size: 649 Bytes
108e4ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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
    }
    
    @classmethod
    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