Skip to content

Conversation

taofuyu
Copy link
Contributor

@taofuyu taofuyu commented Mar 11, 2024

Since most edge devices don't support the op einsum(), I use some other normal ops to replace it. It outputs same results after my verification.
And I don't replacce einsum() in I-PoolingAttention cause it was banned in YOLO-WORLD v2.
Users can determine whether to use einsum() in config, by setting the variable use_einsum:
neck=dict(type='YOLOWorldPAFPN',
guide_channels=text_channels,
embed_channels=neck_embed_channels,
num_heads=neck_num_heads,
block_cfg=dict(type='MaxSigmoidCSPLayerWithTwoConv', use_einsum=False)),
bbox_head=dict(type='YOLOWorldHead',
head_module=dict(type='YOLOWorldHeadModule',
use_bn_head=True,
embed_dims=text_channels,
num_classes=num_training_classes,
use_einsum=False)),

And It does NOT influence the raw outcome of YOLO-WORLD cause its default value is True.

@wondervictor
Copy link
Collaborator

nice pr~

@wondervictor wondervictor merged commit 83601a1 into AILab-CVC:master Mar 11, 2024
@wondervictor wondervictor mentioned this pull request Mar 12, 2024
16 tasks
ben15021999 pushed a commit to ben15021999/YOLO-World that referenced this pull request Jun 26, 2025
replace einsum() with other ops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants