optimum-rbln 0.8.4a3__py3-none-any.whl → 0.8.4a5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of optimum-rbln might be problematic. Click here for more details.

@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.8.4a3'
32
- __version_tuple__ = version_tuple = (0, 8, 4, 'a3')
31
+ __version__ = version = '0.8.4a5'
32
+ __version_tuple__ = version_tuple = (0, 8, 4, 'a5')
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -142,8 +142,8 @@ class RBLNDiffusionMixin:
142
142
  Load a pretrained diffusion pipeline from a model checkpoint, with optional compilation for RBLN NPUs.
143
143
 
144
144
  This method has two distinct operating modes:
145
- - When `export=True`: Takes a PyTorch-based diffusion model, compiles it for RBLN NPUs, and loads the compiled model
146
- - When `export=False`: Loads an already compiled RBLN model from `model_id` without recompilation
145
+ - When `export=True`: Takes a PyTorch-based diffusion model, compiles it for RBLN NPUs, and loads the compiled model
146
+ - When `export=False`: Loads an already compiled RBLN model from `model_id` without recompilation
147
147
 
148
148
  It supports various diffusion pipelines including Stable Diffusion, Kandinsky, ControlNet, and other diffusers-based models.
149
149
 
@@ -89,6 +89,36 @@ class RBLNCosmosTextToWorldPipeline(RBLNDiffusionMixin, CosmosTextToWorldPipelin
89
89
  rbln_config: Dict[str, Any] = {},
90
90
  **kwargs: Any,
91
91
  ):
92
+ """
93
+ Load a pretrained diffusion pipeline from a model checkpoint, with optional compilation for RBLN NPUs.
94
+
95
+ This method has two distinct operating modes:
96
+ - When `export=True`: Takes a PyTorch-based diffusion model, compiles it for RBLN NPUs, and loads the compiled model
97
+ - When `export=False`: Loads an already compiled RBLN model from `model_id` without recompilation
98
+
99
+ It supports various diffusion pipelines including Stable Diffusion, Kandinsky, ControlNet, and other diffusers-based models.
100
+
101
+ Args:
102
+ model_id (`str`):
103
+ The model ID or path to the pretrained model to load. Can be either:
104
+
105
+ - A model ID from the HuggingFace Hub
106
+ - A local path to a saved model directory
107
+ export:
108
+ If True, takes a PyTorch model from `model_id` and compiles it for RBLN NPU execution.
109
+ If False, loads an already compiled RBLN model from `model_id` without recompilation.
110
+ safety_checker:
111
+ Optional custom safety checker to use instead of the default one. Only used when `export=True`.
112
+ rbln_config:
113
+ Configuration options for RBLN compilation. Can include settings for specific submodules
114
+ such as `text_encoder`, `unet`, and `vae`. Configuration can be tailored to the specific
115
+ pipeline being compiled.
116
+ **kwargs:
117
+ Additional arguments to pass to the underlying diffusion pipeline constructor or the
118
+ RBLN compilation process. These may include parameters specific to individual submodules
119
+ or the particular diffusion pipeline being used.
120
+ """
121
+
92
122
  rbln_config, kwargs = cls.get_rbln_config_class().initialize_from_kwargs(rbln_config, **kwargs)
93
123
  if safety_checker is None and export:
94
124
  safety_checker = RBLNCosmosSafetyChecker(rbln_config=rbln_config.safety_checker)
@@ -89,6 +89,36 @@ class RBLNCosmosVideoToWorldPipeline(RBLNDiffusionMixin, CosmosVideoToWorldPipel
89
89
  rbln_config: Dict[str, Any] = {},
90
90
  **kwargs: Any,
91
91
  ):
92
+ """
93
+ Load a pretrained diffusion pipeline from a model checkpoint, with optional compilation for RBLN NPUs.
94
+
95
+ This method has two distinct operating modes:
96
+ - When `export=True`: Takes a PyTorch-based diffusion model, compiles it for RBLN NPUs, and loads the compiled model
97
+ - When `export=False`: Loads an already compiled RBLN model from `model_id` without recompilation
98
+
99
+ It supports various diffusion pipelines including Stable Diffusion, Kandinsky, ControlNet, and other diffusers-based models.
100
+
101
+ Args:
102
+ model_id (`str`):
103
+ The model ID or path to the pretrained model to load. Can be either:
104
+
105
+ - A model ID from the HuggingFace Hub
106
+ - A local path to a saved model directory
107
+ export:
108
+ If True, takes a PyTorch model from `model_id` and compiles it for RBLN NPU execution.
109
+ If False, loads an already compiled RBLN model from `model_id` without recompilation.
110
+ safety_checker:
111
+ Optional custom safety checker to use instead of the default one. Only used when `export=True`.
112
+ rbln_config:
113
+ Configuration options for RBLN compilation. Can include settings for specific submodules
114
+ such as `text_encoder`, `unet`, and `vae`. Configuration can be tailored to the specific
115
+ pipeline being compiled.
116
+ **kwargs:
117
+ Additional arguments to pass to the underlying diffusion pipeline constructor or the
118
+ RBLN compilation process. These may include parameters specific to individual submodules
119
+ or the particular diffusion pipeline being used.
120
+ """
121
+
92
122
  rbln_config, kwargs = cls.get_rbln_config_class().initialize_from_kwargs(rbln_config, **kwargs)
93
123
  if safety_checker is None and export:
94
124
  safety_checker = RBLNCosmosSafetyChecker(rbln_config=rbln_config.safety_checker)
@@ -254,8 +254,7 @@ class RBLNQwen2VLForConditionalGeneration(RBLNDecoderOnlyModelForCausalLM):
254
254
  "device": 0,
255
255
  },
256
256
  "tensor_parallel_size": 8,
257
- "kvcache_partition_len": 16_384,
258
- "max_seq_len": 114_688,
257
+ "max_seq_len": 32_768,
259
258
  "device": [0, 1, 2, 3, 4, 5, 6, 7],
260
259
  },
261
260
  )
@@ -407,7 +406,6 @@ class RBLNQwen2VLForConditionalGeneration(RBLNDecoderOnlyModelForCausalLM):
407
406
  input_id,
408
407
  image_grid_thw[image_idx : image_idx + image_nums] if image_grid_thw is not None else None,
409
408
  video_grid_thw[video_idx : video_idx + video_nums] if video_grid_thw is not None else None,
410
- attention_mask=attention_mask[b_idx : b_idx + 1] if attention_mask is not None else None,
411
409
  )
412
410
  image_idx += image_nums
413
411
  video_idx += video_nums
@@ -83,7 +83,7 @@ class RBLNRuntimeDecoder(RBLNPytorchRuntime):
83
83
  decoding_step = cache_position[b_idx].item()
84
84
  if not (0 <= decoding_step < self.dec_max_seq_len):
85
85
  raise ValueError(
86
- f"Decoding step {decoding_step} out of bounds for attention mask with shape {self.dec_attn_mask.shape}."
86
+ f"Decoding step {decoding_step} out of bounds for decoder_max_seq_len ({self.dec_max_seq_len})."
87
87
  )
88
88
  decoder_attention_mask[b_idx, : decoding_step + 1] = 1
89
89
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: optimum-rbln
3
- Version: 0.8.4a3
3
+ Version: 0.8.4a5
4
4
  Summary: Optimum RBLN is the interface between the HuggingFace Transformers and Diffusers libraries and RBLN accelerators. It provides a set of tools enabling easy model loading and inference on single and multiple rbln device settings for different downstream tasks.
5
5
  Project-URL: Homepage, https://rebellions.ai
6
6
  Project-URL: Documentation, https://docs.rbln.ai
@@ -1,10 +1,10 @@
1
1
  optimum/rbln/__init__.py,sha256=DAJM5PWAYFiWVlyxVXUvj3CaFOEhX1yhEfhIt1LxL-A,18714
2
- optimum/rbln/__version__.py,sha256=y3K5Q-p3yh9vxRHMdoMoq6ATy6fBGj7-nnrEJehRK2c,712
2
+ optimum/rbln/__version__.py,sha256=O3WB9nLWdjxzyq2yPcJiRu11qFUdi3QvSHtzLw_25A8,712
3
3
  optimum/rbln/configuration_utils.py,sha256=WNubd8EJIrdBkLOGT2UJJorgNL3lzhjg3a4bihAIptY,34761
4
4
  optimum/rbln/modeling.py,sha256=cAIPWEw5DGzUWeqjCbocRhU6OO3jyhVGW60AmBLh1Nw,14134
5
5
  optimum/rbln/modeling_base.py,sha256=97ju0uHJXB7PaorKaspf-FbLfsaHy0HwRVLJqtVscXA,27574
6
6
  optimum/rbln/diffusers/__init__.py,sha256=1tgU_xWA42BmInqu9bBz_5R_E9TGhhK3mI06YlaiTLg,7232
7
- optimum/rbln/diffusers/modeling_diffusers.py,sha256=3bzL0ZH7XyS8nGMWRSMIGjl9H3H2fhiZgmPaIF50mwg,20464
7
+ optimum/rbln/diffusers/modeling_diffusers.py,sha256=SgunWDT_vAcCgoPLvHH4Vwc8sw8NvMLmkzys1fZcwJc,20472
8
8
  optimum/rbln/diffusers/configurations/__init__.py,sha256=vMRnPY4s-Uju43xP038D2EA18X_mhy2YfsZVpSU-VoA,1322
9
9
  optimum/rbln/diffusers/configurations/models/__init__.py,sha256=7q95gtgDzCeIBogGw8SLQoHT4Wch7vpLJVF2UQovuoo,567
10
10
  optimum/rbln/diffusers/configurations/models/configuration_autoencoder_kl.py,sha256=ADS4SGZbwY6fy3SVNhgo3Zg4KxzAAGq5_zsJ97Dezh4,3201
@@ -46,8 +46,8 @@ optimum/rbln/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
46
46
  optimum/rbln/diffusers/pipelines/cosmos/__init__.py,sha256=h2j6S8IJPVHeNU8qmW9vyXMgHBw0d7kQcuMAA5YoHPU,795
47
47
  optimum/rbln/diffusers/pipelines/cosmos/configuration_cosmos_guardrail.py,sha256=NsEaRYgiddopL9OE_9CsZqzbikkzoxUoRQaRML-Jqrw,3709
48
48
  optimum/rbln/diffusers/pipelines/cosmos/cosmos_guardrail.py,sha256=Hmklj-sGNtUst6sTLLDXyQzt7zFoNIHytZpPQ-V1CPw,16676
49
- optimum/rbln/diffusers/pipelines/cosmos/pipeline_cosmos_text2world.py,sha256=OtPi0Qw6afNp6r6e5Flbjbn5SsVeM611qEstCNEdWQ0,3899
50
- optimum/rbln/diffusers/pipelines/cosmos/pipeline_cosmos_video2world.py,sha256=dToWLGp9qyFZaccnoFZ42AnK8rKqnB54svui3mIaRNo,3906
49
+ optimum/rbln/diffusers/pipelines/cosmos/pipeline_cosmos_text2world.py,sha256=jP3xIhVrfZ0odORWvqhef9rAN7KiqJ4KdV-vaKdxe_Y,5640
50
+ optimum/rbln/diffusers/pipelines/cosmos/pipeline_cosmos_video2world.py,sha256=U6yK1_77ubCkKZ0XFyabYLSDATQTJqlBuvRQJNolnd0,5647
51
51
  optimum/rbln/diffusers/pipelines/kandinsky2_2/__init__.py,sha256=I4YQq2HfA3xONbWsdJ870IEJPyLWeCDDG-UCJsu9YO8,1035
52
52
  optimum/rbln/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py,sha256=2vgZZt0JrZlbHbUlBHrT0zKvYhuX1a4vwy3mxTPHisM,1335
53
53
  optimum/rbln/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py,sha256=QqxR325Or00E77XDvR3MotltnghC-42bky1ckU1DW9U,8128
@@ -186,7 +186,7 @@ optimum/rbln/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py,sha256=hRvA37
186
186
  optimum/rbln/transformers/models/qwen2_5_vl/qwen2_5_vl_architecture.py,sha256=i_UUWhKoFjJ5CCpgeWicqABM23TxMEKPQ354LoZ6iUU,7445
187
187
  optimum/rbln/transformers/models/qwen2_vl/__init__.py,sha256=O3t6zKda92CnZDzEnz_dcisMOQ71-OOJxElXzKCH5e0,849
188
188
  optimum/rbln/transformers/models/qwen2_vl/configuration_qwen2_vl.py,sha256=OGIlUHWNymBTOxnwit-1gm2Gpl8bbGV0i076Sa4RgCw,4718
189
- optimum/rbln/transformers/models/qwen2_vl/modeling_qwen2_vl.py,sha256=OKjhwWe0UDczmauCNQA838BF3n1BIz8c7oM5gaBVUz8,20286
189
+ optimum/rbln/transformers/models/qwen2_vl/modeling_qwen2_vl.py,sha256=10NR0LPJFICpPUrINpyMDWVx19HN8sXPpeAiVhE_k2k,20130
190
190
  optimum/rbln/transformers/models/qwen2_vl/qwen2_vl_architecture.py,sha256=EZlCuSRTIpSAGEjtDi4SY1V9RRdtgg76ie5jqec1UuI,4833
191
191
  optimum/rbln/transformers/models/qwen3/__init__.py,sha256=tI4KwvXpD35dUUaa8aLUXpWoU9gJGcmKXeywOlH14ZE,746
192
192
  optimum/rbln/transformers/models/qwen3/configuration_qwen3.py,sha256=BFRPggnH4VlsXlOa19C6KAID-bPgQ8ooQ29dvogh5zk,2102
@@ -200,7 +200,7 @@ optimum/rbln/transformers/models/roberta/configuration_roberta.py,sha256=6KhO-xB
200
200
  optimum/rbln/transformers/models/roberta/modeling_roberta.py,sha256=74Pswb5JJNtctvrQHlo2zYocKZN0npWhjAaKMUDVBUU,1535
201
201
  optimum/rbln/transformers/models/seq2seq/__init__.py,sha256=HiSyWFcKeZ8okfo-s-_Mf_upyvAoZwraUIJyGNLNurY,714
202
202
  optimum/rbln/transformers/models/seq2seq/configuration_seq2seq.py,sha256=Che6vOuehOD6hwCQ0NbGbh9eSI2AKl4ldiavKKfzHQo,3123
203
- optimum/rbln/transformers/models/seq2seq/modeling_seq2seq.py,sha256=8qRESu6Go6smZJCnZroML1zFirY0Vo4CGJm9yuo8tpA,18303
203
+ optimum/rbln/transformers/models/seq2seq/modeling_seq2seq.py,sha256=G7Rkx4paSDlSE2pa1dtXTOGN9L9uy7ovVZjSrS8c5Kk,18295
204
204
  optimum/rbln/transformers/models/seq2seq/seq2seq_architecture.py,sha256=4MupGjhe_DpBLl43VVYY72WWiVdAr0mRPp8cHalQh2w,20028
205
205
  optimum/rbln/transformers/models/siglip/__init__.py,sha256=X1Fc1GUnJ2EIxFx45nbeoW-T2t0OyP3W73C0HD8Vowo,712
206
206
  optimum/rbln/transformers/models/siglip/configuration_siglip.py,sha256=m1h8iDx_X9VmHdJi0sc1a2KsAO3OnpMb4cd9jW2Ic-U,3031
@@ -242,7 +242,7 @@ optimum/rbln/utils/model_utils.py,sha256=4k5879Kh75m3x_vS4-qOGfqsOiAvc2kdNFFfvsF
242
242
  optimum/rbln/utils/runtime_utils.py,sha256=R6uXDbeJP03-FWdd4vthNe2D4aCra5n12E3WB1ifiGM,7933
243
243
  optimum/rbln/utils/save_utils.py,sha256=hG5uOtYmecSXZuGTvCXsTM-SiyZpr5q3InUGCCq_jzQ,3619
244
244
  optimum/rbln/utils/submodule.py,sha256=60NGLFvnhjP1DJg1opdb-FVQDsthcLCwWjW_1WQaasU,5280
245
- optimum_rbln-0.8.4a3.dist-info/METADATA,sha256=oCoMIFXq285yfSiKRSadH1GOD7aSHzZ1eGdXs2BLLqA,5299
246
- optimum_rbln-0.8.4a3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
247
- optimum_rbln-0.8.4a3.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
248
- optimum_rbln-0.8.4a3.dist-info/RECORD,,
245
+ optimum_rbln-0.8.4a5.dist-info/METADATA,sha256=tNYTi5jcClIr6oyXbiAJ_69C485ec2nGx23ob_fTdwI,5299
246
+ optimum_rbln-0.8.4a5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
247
+ optimum_rbln-0.8.4a5.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
248
+ optimum_rbln-0.8.4a5.dist-info/RECORD,,