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
renzhc
diffusers_dcu
Commits
c7a8c439
Unverified
Commit
c7a8c439
authored
Feb 20, 2025
by
Haoyun Qin
Committed by
GitHub
Feb 20, 2025
Browse files
fix: support transformer models' `generation_config` in pipeline (#10779)
parent
a4c1aac3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/diffusers/pipelines/pipeline_utils.py
src/diffusers/pipelines/pipeline_utils.py
+2
-0
No files found.
src/diffusers/pipelines/pipeline_utils.py
View file @
c7a8c439
...
...
@@ -1462,6 +1462,8 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
allow_patterns
+=
[
f
"
{
custom_pipeline
}
.py"
]
if
f
"
{
custom_pipeline
}
.py"
in
filenames
else
[]
# also allow downloading config.json files with the model
allow_patterns
+=
[
os
.
path
.
join
(
k
,
"config.json"
)
for
k
in
model_folder_names
]
# also allow downloading generation_config.json of the transformers model
allow_patterns
+=
[
os
.
path
.
join
(
k
,
"generation_config.json"
)
for
k
in
model_folder_names
]
allow_patterns
+=
[
SCHEDULER_CONFIG_NAME
,
CONFIG_NAME
,
...
...
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