--- description: Discover detailed information on ImageEncoderViT, PositionEmbeddingRandom, Attention, window_partition, get_rel_pos and more in Ultralytics models encoders documentation. keywords: Ultralytics, Encoders, Modules, Documentation, ImageEncoderViT, PositionEmbeddingRandom, Attention, window_partition, get_rel_pos --- ## ImageEncoderViT --- ### ::: ultralytics.models.sam.modules.encoders.ImageEncoderViT

## PromptEncoder --- ### ::: ultralytics.models.sam.modules.encoders.PromptEncoder

## PositionEmbeddingRandom --- ### ::: ultralytics.models.sam.modules.encoders.PositionEmbeddingRandom

## Block --- ### ::: ultralytics.models.sam.modules.encoders.Block

## Attention --- ### ::: ultralytics.models.sam.modules.encoders.Attention

## PatchEmbed --- ### ::: ultralytics.models.sam.modules.encoders.PatchEmbed

## window_partition --- ### ::: ultralytics.models.sam.modules.encoders.window_partition

## window_unpartition --- ### ::: ultralytics.models.sam.modules.encoders.window_unpartition

## get_rel_pos --- ### ::: ultralytics.models.sam.modules.encoders.get_rel_pos

## add_decomposed_rel_pos --- ### ::: ultralytics.models.sam.modules.encoders.add_decomposed_rel_pos