Unverified Commit d432ade7 authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

fix: qwen2.5vl, qwen3vl composite image (#12841)

this change fixes images with an alpha channel by overlaying the image
onto a white background
parent 06b3422d
......@@ -79,6 +79,8 @@ type Grid struct {
}
func (p *ImageProcessor) ProcessImage(img image.Image) ([]float32, *Grid, error) {
img = imageproc.Composite(img)
origWidth := img.Bounds().Dx()
origHeight := img.Bounds().Dy()
......
......@@ -83,6 +83,8 @@ type Grid struct {
}
func (p *ImageProcessor) ProcessImage(ctx ml.Context, img image.Image) (ml.Tensor, *Grid, error) {
img = imageproc.Composite(img)
origWidth := img.Bounds().Dx()
origHeight := img.Bounds().Dy()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment