Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
47298fce
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "448c72a230ceb31ae60e70e3b62e327314928a5e"
Commit
47298fce
authored
Sep 28, 2025
by
shengxinjing
Committed by
Michael Yang
Oct 09, 2025
Browse files
refactor: use builtin max and min
parent
4a48937e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
model/models/llama4/process_image.go
model/models/llama4/process_image.go
+1
-1
No files found.
model/models/llama4/process_image.go
View file @
47298fce
...
@@ -124,7 +124,7 @@ func (p ImageProcessor) maxResolution(imageRes, targetRes image.Point) image.Poi
...
@@ -124,7 +124,7 @@ func (p ImageProcessor) maxResolution(imageRes, targetRes image.Point) image.Poi
if
scaleW
<
scaleH
{
if
scaleW
<
scaleH
{
newRes
=
image
.
Point
{
newRes
=
image
.
Point
{
targetRes
.
X
,
targetRes
.
X
,
int
(
math
.
Floor
(
float64
(
imageRes
.
Y
)
*
scaleW
),
float64
(
targetRes
.
Y
))),
int
(
min
(
math
.
Floor
(
float64
(
imageRes
.
Y
)
*
scaleW
),
float64
(
targetRes
.
Y
))),
}
}
}
else
{
}
else
{
newRes
=
image
.
Point
{
newRes
=
image
.
Point
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment