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
4331923b
"...models/git@developer.sourcefind.cn:Wenxuan/LightX2V.git" did not exist on "6f9bbff6aca183c3057d7a8828e34778434488bc"
Unverified
Commit
4331923b
authored
Apr 26, 2023
by
Sylvain Gugger
Committed by
GitHub
Apr 26, 2023
Browse files
Fix None value when adding info to auto_map (#22990)
parent
d0b50023
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/transformers/utils/generic.py
src/transformers/utils/generic.py
+3
-3
No files found.
src/transformers/utils/generic.py
View file @
4331923b
...
...
@@ -560,8 +560,8 @@ def add_model_info_to_auto_map(auto_map, repo_id):
"""
for
key
,
value
in
auto_map
.
items
():
if
isinstance
(
value
,
(
tuple
,
list
)):
auto_map
[
key
]
=
[
f
"
{
repo_id
}
--
{
v
}
"
if
"--"
not
in
v
else
v
for
v
in
value
]
el
s
e
:
auto_map
[
key
]
=
f
"
{
repo_id
}
--
{
value
}
"
if
"--"
not
in
value
else
value
auto_map
[
key
]
=
[
f
"
{
repo_id
}
--
{
v
}
"
if
(
v
is
not
None
and
"--"
not
in
v
)
else
v
for
v
in
value
]
el
if
value
is
not
None
and
"--"
not
in
valu
e
:
auto_map
[
key
]
=
f
"
{
repo_id
}
--
{
value
}
"
return
auto_map
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