optimum-rbln 0.8.1a3__py3-none-any.whl → 0.8.1a4__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.
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.8.1a3'
21
- __version_tuple__ = version_tuple = (0, 8, 1, 'a3')
20
+ __version__ = version = '0.8.1a4'
21
+ __version_tuple__ = version_tuple = (0, 8, 1, 'a4')
@@ -185,7 +185,10 @@ class RBLNUNet2DConditionModel(RBLNModel):
185
185
  rbln_config: RBLNUNet2DConditionModelConfig,
186
186
  image_size: Optional[Tuple[int, int]] = None,
187
187
  ) -> Tuple[int, int]:
188
- scale_factor = pipe.movq_scale_factor if hasattr(pipe, "movq_scale_factor") else pipe.vae_scale_factor
188
+ if hasattr(pipe, "movq"):
189
+ scale_factor = 2 ** (len(pipe.movq.config.block_out_channels) - 1)
190
+ else:
191
+ scale_factor = pipe.vae_scale_factor
189
192
 
190
193
  if image_size is None:
191
194
  if "Img2Img" in pipe.__class__.__name__:
@@ -11,7 +11,6 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- import importlib
15
14
  import inspect
16
15
  from collections import deque
17
16
  from dataclasses import dataclass
@@ -124,23 +123,6 @@ class RBLNGemma3ForConditionalGeneration(RBLNModel):
124
123
  def can_generate(self):
125
124
  return True
126
125
 
127
- @classmethod
128
- def get_pytorch_model(cls, *args, **kwargs):
129
- model = super().get_pytorch_model(*args, **kwargs)
130
-
131
- with no_init_weights():
132
- model_cls_name = model.model.language_model.__class__.__name__
133
- causal_model_cls_name = model_cls_name.replace("TextModel", "ForCausalLM")
134
- causal_model_cls = getattr(importlib.import_module("transformers"), causal_model_cls_name)
135
- new_language_model = causal_model_cls(model.model.language_model.config)
136
-
137
- new_language_model.lm_head = model.lm_head
138
- new_language_model.model = model.model.language_model
139
- model.model.language_model = new_language_model
140
- model.lm_head = None
141
- del model.lm_head
142
- return model
143
-
144
126
  def __post_init__(self, **kwargs):
145
127
  self.vision_tower = LoopVisionTower(self.rbln_submodules[0])
146
128
  self.language_model = self.rbln_submodules[1]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: optimum-rbln
3
- Version: 0.8.1a3
3
+ Version: 0.8.1a4
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
@@ -23,7 +23,7 @@ Classifier: Programming Language :: Python :: 3.12
23
23
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
24
  Requires-Python: <3.13,>=3.9
25
25
  Requires-Dist: accelerate>=1.0.1
26
- Requires-Dist: diffusers<=0.31.0
26
+ Requires-Dist: diffusers==0.34.0
27
27
  Requires-Dist: packaging>=24.1
28
28
  Requires-Dist: torch==2.6.0
29
29
  Requires-Dist: torchaudio<=2.6.0
@@ -1,5 +1,5 @@
1
1
  optimum/rbln/__init__.py,sha256=qJJTumXhoFnawXGpeGJbAm4J4A9FFwD1SQ2MqcKDXoM,14436
2
- optimum/rbln/__version__.py,sha256=bE7uZ_Vr3gK5nEF_YfozhLcF3_Q9HvGMYkpifHovJxI,519
2
+ optimum/rbln/__version__.py,sha256=hdBV0MOKkAsGp6FVqyauDmHCC6gC0y_cyykn1_s49sg,519
3
3
  optimum/rbln/configuration_utils.py,sha256=o5oer7fBdE-MHLGNXoP35FjmuQbMmjEIDv0QE_k3kpo,32336
4
4
  optimum/rbln/modeling.py,sha256=ZlJ_tOCWiFjDIlwJ_B_HOCO0kBduWrBAbW9VSEVIAFg,12088
5
5
  optimum/rbln/modeling_base.py,sha256=5fUb1FaxfjApzJIkT8-SrPhuygGo_1Uc0i7UedawOeE,23393
@@ -29,7 +29,7 @@ optimum/rbln/diffusers/models/transformers/__init__.py,sha256=V8rSR7WzHs-i8Cwb_M
29
29
  optimum/rbln/diffusers/models/transformers/prior_transformer.py,sha256=SWoeVK--BRMwuXVABNVtonmzJDusx0iz4Q3EAvJ9uN8,5395
30
30
  optimum/rbln/diffusers/models/transformers/transformer_sd3.py,sha256=yF7sS0QvawowpV9hR5GeT8DaE8CCp3mj1njHHd9cKTc,6630
31
31
  optimum/rbln/diffusers/models/unets/__init__.py,sha256=MaICuK9CWjgzejXy8y2NDrphuEq1rkzanF8u45k6O5I,655
32
- optimum/rbln/diffusers/models/unets/unet_2d_condition.py,sha256=AVt3vbERl27K7G6cFnNh45AG-gdp_NNN4svxeQ2cjFw,15767
32
+ optimum/rbln/diffusers/models/unets/unet_2d_condition.py,sha256=v3WS9EGKROE_QClXrxC7rmRko1BspAvAbeIfh83LK88,15832
33
33
  optimum/rbln/diffusers/pipelines/__init__.py,sha256=5KLZ5LrpMzBya2e_3_PvEoPwG24U8JMexfw_ygZREKc,3140
34
34
  optimum/rbln/diffusers/pipelines/controlnet/__init__.py,sha256=n1Ef22TSeax-kENi_d8K6wGGHSNEo9QkUeygELHgcao,983
35
35
  optimum/rbln/diffusers/pipelines/controlnet/multicontrolnet.py,sha256=3S9dogIHW8Bqg5kIlCudhCQG-4g3FcdOPEWhBOf7CJA,4059
@@ -106,7 +106,7 @@ optimum/rbln/transformers/models/gemma/modeling_gemma.py,sha256=Ojvum34EhDHWfMB4
106
106
  optimum/rbln/transformers/models/gemma3/__init__.py,sha256=6rugk3615SEt4lh7gduo_J9VyGiSReuEIvL0Uno0eaI,790
107
107
  optimum/rbln/transformers/models/gemma3/configuration_gemma3.py,sha256=eupMGTHJGJNNrAZ3GE6M6GQBAQzBb7KFJvalyDmbM-A,3063
108
108
  optimum/rbln/transformers/models/gemma3/gemma3_architecture.py,sha256=sgFQQbvEr15tb2Sxk_tgcgQFcjhKGbNSW6fm2u7-Vck,8609
109
- optimum/rbln/transformers/models/gemma3/modeling_gemma3.py,sha256=9c6-Qz4EGGbSnKwoz2zH5r6W7sVfjb-m5Z-dnQkAOXU,38992
109
+ optimum/rbln/transformers/models/gemma3/modeling_gemma3.py,sha256=IMrDtY2o-kzDQd3VG5qx_I8HejSxqGPDV2EqTjzrrfM,38220
110
110
  optimum/rbln/transformers/models/gpt2/__init__.py,sha256=socBMIBZSiLbrVN12rQ4nL9gFeT0axMgz6SWaCaD4Ac,704
111
111
  optimum/rbln/transformers/models/gpt2/configuration_gpt2.py,sha256=9sS6-EGapmow3rG9ViejK9qwrqy_X86VBxQ7u9x0Yqk,923
112
112
  optimum/rbln/transformers/models/gpt2/gpt2_architecture.py,sha256=pnGgixjgjW7HULbs5211cC2guw_4e4-MlS69vdCRMMg,3206
@@ -191,7 +191,7 @@ optimum/rbln/utils/model_utils.py,sha256=4k5879Kh75m3x_vS4-qOGfqsOiAvc2kdNFFfvsF
191
191
  optimum/rbln/utils/runtime_utils.py,sha256=LoKNK3AQNV_BSScstIZWjICkJf265MnUgy360BOocVI,5454
192
192
  optimum/rbln/utils/save_utils.py,sha256=hG5uOtYmecSXZuGTvCXsTM-SiyZpr5q3InUGCCq_jzQ,3619
193
193
  optimum/rbln/utils/submodule.py,sha256=w5mgPgncI740gVKMu3S-69DGNdUSI0bTZxegQGcZ98Y,5011
194
- optimum_rbln-0.8.1a3.dist-info/METADATA,sha256=e2Q0Hat0Lk5pWpTSk_kbikGUsOezSiz7nM-01GXFU8w,5299
195
- optimum_rbln-0.8.1a3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
196
- optimum_rbln-0.8.1a3.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
197
- optimum_rbln-0.8.1a3.dist-info/RECORD,,
194
+ optimum_rbln-0.8.1a4.dist-info/METADATA,sha256=jo7yVVPhX8QJJK0WE1x2ReG_VbuNiyhAkAPj9Um90A8,5299
195
+ optimum_rbln-0.8.1a4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
196
+ optimum_rbln-0.8.1a4.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
197
+ optimum_rbln-0.8.1a4.dist-info/RECORD,,