Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
8d891e6e
Unverified
Commit
8d891e6e
authored
Dec 18, 2023
by
Patrick von Platen
Committed by
GitHub
Dec 18, 2023
Browse files
[Torch Compile] Fix torch compile for svd vae (#6217)
parent
cce1fe2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py
...stable_video_diffusion/pipeline_stable_video_diffusion.py
+3
-2
No files found.
src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py
View file @
8d891e6e
...
...
@@ -25,7 +25,7 @@ from ...image_processor import VaeImageProcessor
from
...models
import
AutoencoderKLTemporalDecoder
,
UNetSpatioTemporalConditionModel
from
...schedulers
import
EulerDiscreteScheduler
from
...utils
import
BaseOutput
,
logging
from
...utils.torch_utils
import
randn_tensor
from
...utils.torch_utils
import
is_compiled_module
,
randn_tensor
from
..pipeline_utils
import
DiffusionPipeline
...
...
@@ -211,7 +211,8 @@ class StableVideoDiffusionPipeline(DiffusionPipeline):
latents
=
1
/
self
.
vae
.
config
.
scaling_factor
*
latents
accepts_num_frames
=
"num_frames"
in
set
(
inspect
.
signature
(
self
.
vae
.
forward
).
parameters
.
keys
())
forward_vae_fn
=
self
.
vae
.
_orig_mod
.
forward
if
is_compiled_module
(
self
.
vae
)
else
self
.
vae
.
forward
accepts_num_frames
=
"num_frames"
in
set
(
inspect
.
signature
(
forward_vae_fn
).
parameters
.
keys
())
# decode decode_chunk_size frames at a time to avoid OOM
frames
=
[]
...
...
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