Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
367cb8ce
Unverified
Commit
367cb8ce
authored
Feb 15, 2025
by
Cyrus Leung
Committed by
GitHub
Feb 15, 2025
Browse files
[Doc] [2/N] Add Fuyu E2E example for multimodal processor (#13331)
parent
54ed913f
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
529 additions
and
31 deletions
+529
-31
docs/source/contributing/model/multimodal.md
docs/source/contributing/model/multimodal.md
+525
-29
vllm/model_executor/models/fuyu.py
vllm/model_executor/models/fuyu.py
+4
-2
No files found.
docs/source/contributing/model/multimodal.md
View file @
367cb8ce
This diff is collapsed.
Click to expand it.
vllm/model_executor/models/fuyu.py
View file @
367cb8ce
...
@@ -104,6 +104,8 @@ class FuyuProcessingInfo(BaseProcessingInfo):
...
@@ -104,6 +104,8 @@ class FuyuProcessingInfo(BaseProcessingInfo):
image_processor
=
self
.
get_image_processor
()
image_processor
=
self
.
get_image_processor
()
target_width
=
image_processor
.
size
[
"width"
]
target_width
=
image_processor
.
size
[
"width"
]
target_height
=
image_processor
.
size
[
"height"
]
target_height
=
image_processor
.
size
[
"height"
]
patch_width
=
image_processor
.
patch_size
[
"width"
]
patch_height
=
image_processor
.
patch_size
[
"height"
]
if
not
(
image_width
<=
target_width
and
image_height
<=
target_height
):
if
not
(
image_width
<=
target_width
and
image_height
<=
target_height
):
height_scale_factor
=
target_height
/
image_height
height_scale_factor
=
target_height
/
image_height
...
@@ -113,8 +115,8 @@ class FuyuProcessingInfo(BaseProcessingInfo):
...
@@ -113,8 +115,8 @@ class FuyuProcessingInfo(BaseProcessingInfo):
image_height
=
int
(
image_height
*
optimal_scale_factor
)
image_height
=
int
(
image_height
*
optimal_scale_factor
)
image_width
=
int
(
image_width
*
optimal_scale_factor
)
image_width
=
int
(
image_width
*
optimal_scale_factor
)
ncols
=
math
.
ceil
(
image_width
/
30
)
ncols
=
math
.
ceil
(
image_width
/
patch_width
)
nrows
=
math
.
ceil
(
image_height
/
30
)
nrows
=
math
.
ceil
(
image_height
/
patch_height
)
return
ncols
,
nrows
return
ncols
,
nrows
def
get_image_size_with_most_features
(
self
)
->
ImageSize
:
def
get_image_size_with_most_features
(
self
)
->
ImageSize
:
...
...
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