File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 13
13
from kimm ._src .utils .model_registry import list_models
14
14
from kimm ._src .version import version
15
15
16
- __version__ = "0.2.4 "
16
+ __version__ = "0.2.5 "
Original file line number Diff line number Diff line change @@ -271,6 +271,14 @@ def get_config(self):
271
271
def fix_config (self , config : typing .Dict ):
272
272
return config
273
273
274
+ @classmethod
275
+ def from_config (cls , config , custom_objects = None ):
276
+ # Set `self._weight` to `None` to avoid redownloading issue.
277
+ config = config .copy ()
278
+ if "weights" in config :
279
+ config ["weights" ] = None
280
+ return cls (** config )
281
+
274
282
def __repr__ (self ):
275
283
repr_str = (
276
284
f"<{ self .__class__ .__name__ } "
Original file line number Diff line number Diff line change 1
1
from kimm ._src .kimm_export import kimm_export
2
2
3
- __version__ = "0.2.4 "
3
+ __version__ = "0.2.5 "
4
4
5
5
6
6
@kimm_export ("kimm" )
You can’t perform that action at this time.
0 commit comments