Skip to content

llava-cli: fix base64 prompt#7248

Merged
mofosyne merged 1 commit intoggml-org:masterfrom
Adriankhl:fix-llava
May 13, 2024
Merged

llava-cli: fix base64 prompt#7248
mofosyne merged 1 commit intoggml-org:masterfrom
Adriankhl:fix-llava

Conversation

@Adriankhl
Copy link
Copy Markdown
Contributor

@Adriankhl Adriankhl commented May 13, 2024

The multiple image PR #6969 breaks base64 prompt processing in llava-cli

Without this change, the main function just iterate through image file paths, ignore base64 code in prompt, you have to add an empty image path --image "" as a workaround

.\bin\llava-cli.exe -m ..\..\..\models\llava-phi-3-mini-int4.gguf --mmproj ..\..\..\models\llava-phi-3-mini-mmproj-f16.gguf -c 4096 -p "<img src=\`"data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAARklEQVR4nGLpPPSRgRSw2aaBJPVMJKkmA4xaMGrBqAWjFoxaQA3A+NnMjCQN72pkSVI/9INo1IJRC0YtGLVgRFgACAAA//8j+AbTk2+QtAAAAABJRU5ErkJggg==\`">Provide a full description" --image ""

Now this works

.\bin\llava-cli.exe -m ..\..\..\models\llava-phi-3-mini-int4.gguf --mmproj ..\..\..\models\llava-phi-3-mini-mmproj-f16.gguf -c 4096 -p "<img src=\`"data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAARklEQVR4nGLpPPSRgRSw2aaBJPVMJKkmA4xaMGrBqAWjFoxaQA3A+NnMjCQN72pkSVI/9INo1IJRC0YtGLVgRFgACAAA//8j+AbTk2+QtAAAAABJRU5ErkJggg==\`">Provide a full description"

@mofosyne mofosyne added bugfix fixes an issue or bug Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix labels May 13, 2024
@mofosyne mofosyne merged commit 30e7033 into ggml-org:master May 13, 2024
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix fixes an issue or bug Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants