Direct image input via PIL instead of Base64

未關閉
#2,078 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
python
領域
api, backend

研究方向

查看程式碼庫中的影像輸入處理程式碼,可能位於模型推論或 API 層附近。找出目前進行 Base64 編碼/解碼的位置。研究如何將 PIL 影像直接傳遞給底層的 llama.cpp C++ binding。檢查現有的影像處理測試,以了解介面。「完成」表示 API 接受 PIL Image 物件或檔案路徑,並在沒有 Base64 記憶體開銷的情況下處理它。

由索引模型根據 Issue 內容生成。

描述

Describe the solution you'd like

Support for PIL library image input (path) instead of Base64 encoding.
For example, when using models with transformers library, I provide images this way img = Image.open(path).convert("RGB") which isn't an additional 33% increase of memory overhead like it is with Base64.

Describe alternatives you've considered

I am currently using llama.cpp CLI version to process images in batch using GGUF models but I'd rather prefer this functionality here as well.

主要語言
Python
星號
10.7k
分支
1.5k
平均合併
1 小時 40 分鐘
30 天內合併 PR
5

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

abetlen/llama-cpp-python 的其他 Issue

查看 abetlen/llama-cpp-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。