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
OpenDAS
diffusers
Commits
8de78001
Unverified
Commit
8de78001
authored
Feb 08, 2024
by
Masamune Ishihara
Committed by
GitHub
Feb 08, 2024
Browse files
Add fps argument to export_to_gif function. (#6786)
parent
3ac23577
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/diffusers/utils/export_utils.py
src/diffusers/utils/export_utils.py
+2
-2
No files found.
src/diffusers/utils/export_utils.py
View file @
8de78001
...
...
@@ -28,7 +28,7 @@ def buffered_writer(raw_f):
f
.
flush
()
def
export_to_gif
(
image
:
List
[
PIL
.
Image
.
Image
],
output_gif_path
:
str
=
None
)
->
str
:
def
export_to_gif
(
image
:
List
[
PIL
.
Image
.
Image
],
output_gif_path
:
str
=
None
,
fps
:
int
=
10
)
->
str
:
if
output_gif_path
is
None
:
output_gif_path
=
tempfile
.
NamedTemporaryFile
(
suffix
=
".gif"
).
name
...
...
@@ -37,7 +37,7 @@ def export_to_gif(image: List[PIL.Image.Image], output_gif_path: str = None) ->
save_all
=
True
,
append_images
=
image
[
1
:],
optimize
=
False
,
duration
=
100
,
duration
=
100
0
//
fps
,
loop
=
0
,
)
return
output_gif_path
...
...
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