fix: address phase 1 ai review
This commit is contained in:
@@ -110,14 +110,15 @@ def decode_image_data_url(data_url: str) -> bytes:
|
||||
|
||||
|
||||
def resolution_to_size(resolution: str) -> str:
|
||||
key = str(resolution).strip().upper()
|
||||
mapping = {
|
||||
"512": "512x512",
|
||||
"512px": "512x512",
|
||||
"512PX": "512x512",
|
||||
"1K": "1024x1024",
|
||||
"2K": "2048x2048",
|
||||
"4K": "4096x4096",
|
||||
}
|
||||
return mapping.get(str(resolution), str(resolution))
|
||||
return mapping.get(key, str(resolution).strip())
|
||||
|
||||
|
||||
def extract_image_from_response(
|
||||
|
||||
Reference in New Issue
Block a user