Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
1e9da2b0
Unverified
Commit
1e9da2b0
authored
Jun 23, 2023
by
Yih-Dar
Committed by
GitHub
Jun 23, 2023
Browse files
Update `JukeboxConfig.from_pretrained` (#24443)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
8767958f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/transformers/models/jukebox/configuration_jukebox.py
src/transformers/models/jukebox/configuration_jukebox.py
+4
-0
No files found.
src/transformers/models/jukebox/configuration_jukebox.py
View file @
1e9da2b0
...
...
@@ -353,6 +353,8 @@ class JukeboxPriorConfig(PretrainedConfig):
def
from_pretrained
(
cls
,
pretrained_model_name_or_path
:
Union
[
str
,
os
.
PathLike
],
level
=
0
,
**
kwargs
)
->
"PretrainedConfig"
:
cls
.
_set_token_in_kwargs
(
kwargs
)
config_dict
,
kwargs
=
cls
.
get_config_dict
(
pretrained_model_name_or_path
,
**
kwargs
)
# get the prior config dict if we are loading from JukeboxConfig
...
...
@@ -486,6 +488,8 @@ class JukeboxVQVAEConfig(PretrainedConfig):
@
classmethod
def
from_pretrained
(
cls
,
pretrained_model_name_or_path
:
Union
[
str
,
os
.
PathLike
],
**
kwargs
)
->
"PretrainedConfig"
:
cls
.
_set_token_in_kwargs
(
kwargs
)
config_dict
,
kwargs
=
cls
.
get_config_dict
(
pretrained_model_name_or_path
,
**
kwargs
)
# get the text config dict if we are loading from CLIPConfig
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment