-
Notifications
You must be signed in to change notification settings - Fork 13.9k
model: LFM2-VL fixes #17577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tdakhran
wants to merge
10
commits into
ggml-org:master
Choose a base branch
from
Liquid4All:tarek/feat/upstream_17290
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+165
−12
Open
model: LFM2-VL fixes #17577
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
baacb35
Adjust to pytorch
tdakhran bfdf624
Add antialiasing upscale
tdakhran c236bee
Increase number of patches to 1024
tdakhran 1fea2d1
Handle default marker insertion for LFM2
tdakhran 1f4f2bd
Switch to flag
tdakhran b1ba04d
Reformat
tdakhran 7c27ef9
Cuda implementation of antialias kernel
tdakhran c03f031
Change placement in ops.cpp
tdakhran 215388f
consistent float literals
tdakhran 50ba22e
Pad only for LFM2
tdakhran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
consistent float literals
- Loading branch information
commit 215388f2161bf502e7fa07148ece1a029706a8bf
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,10 +108,10 @@ static __global__ void upscale_f32_bilinear_antialias(const float * src0, float | |
| const float x = ((float)i10_dst + pixel_offset) / sf0; | ||
|
|
||
| // support and invscale, maximum 1 pixel for bilinear | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shall be minimum in the comment |
||
| const float support1 = max(1.f / sf1, 1.f); | ||
| const float invscale1 = 1.0 / support1; | ||
| const float support0 = max(1.f / sf0, 1.f); | ||
| const float invscale0 = 1.f / support0; | ||
| const float support1 = max(1.0f / sf1, 1.0f); | ||
| const float invscale1 = 1.0f / support1; | ||
| const float support0 = max(1.0f / sf0, 1.0f); | ||
| const float invscale0 = 1.0f / support0; | ||
|
|
||
| // the range of source pixels that contribute | ||
| const int64_t x_min = max(int64_t(0), int64_t(x - support0 + pixel_offset)); | ||
|
|
@@ -124,7 +124,7 @@ static __global__ void upscale_f32_bilinear_antialias(const float * src0, float | |
| float total_weight = 0.0f; | ||
|
|
||
| auto triangle_filter = [](float x) -> float { | ||
| return max(1.0f - fabsf(x), 0.f); | ||
| return max(1.0f - fabsf(x), 0.0f); | ||
| }; | ||
|
|
||
| for (int64_t sy = y_min; sy < y_max; sy++) { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall be minimum in the comment