From 5b27a1dce413987f07f3a063a938ca27ecc82ea0 Mon Sep 17 00:00:00 2001 From: Christopher Chou <49086305+BabyChouSr@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:41:30 -0800 Subject: [PATCH] Rename image_url to image_file (#15) --- python/sglang/srt/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/utils.py b/python/sglang/srt/utils.py index 212533f1c..54e14fe67 100644 --- a/python/sglang/srt/utils.py +++ b/python/sglang/srt/utils.py @@ -209,7 +209,7 @@ def load_image(image_file): elif image_file.lower().endswith(("png", "jpg", "jpeg", "webp", "gif")): image = Image.open(image_file) elif image_file.startswith("data:"): - image_file = image_url.split(",")[1] + image_file = image_file.split(",")[1] image = Image.open(BytesIO(base64.b64decode(image_file))) else: image = Image.open(BytesIO(base64.b64decode(image_file)))