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
fe794894
Unverified
Commit
fe794894
authored
Jul 20, 2024
by
Pierre Chapuis
Committed by
GitHub
Jul 19, 2024
Browse files
allow tensors in several schedulers step() call (#8905)
parent
461efc57
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
src/diffusers/schedulers/scheduling_deis_multistep.py
src/diffusers/schedulers/scheduling_deis_multistep.py
+2
-2
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
...sers/schedulers/scheduling_dpmsolver_multistep_inverse.py
+1
-1
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
+1
-1
src/diffusers/schedulers/scheduling_edm_dpmsolver_multistep.py
...iffusers/schedulers/scheduling_edm_dpmsolver_multistep.py
+1
-1
src/diffusers/schedulers/scheduling_ipndm.py
src/diffusers/schedulers/scheduling_ipndm.py
+1
-1
src/diffusers/schedulers/scheduling_unipc_multistep.py
src/diffusers/schedulers/scheduling_unipc_multistep.py
+1
-1
No files found.
src/diffusers/schedulers/scheduling_deis_multistep.py
View file @
fe794894
...
@@ -674,7 +674,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -674,7 +674,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
return_dict
:
bool
=
True
,
return_dict
:
bool
=
True
,
)
->
Union
[
SchedulerOutput
,
Tuple
]:
)
->
Union
[
SchedulerOutput
,
Tuple
]:
...
@@ -685,7 +685,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -685,7 +685,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin):
Args:
Args:
model_output (`torch.Tensor`):
model_output (`torch.Tensor`):
The direct output from learned diffusion model.
The direct output from learned diffusion model.
timestep (`
floa
t`):
timestep (`
in
t`):
The current discrete timestep in the diffusion chain.
The current discrete timestep in the diffusion chain.
sample (`torch.Tensor`):
sample (`torch.Tensor`):
A current instance of a sample created by the diffusion process.
A current instance of a sample created by the diffusion process.
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
View file @
fe794894
...
@@ -920,7 +920,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -920,7 +920,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
generator
=
None
,
generator
=
None
,
variance_noise
:
Optional
[
torch
.
Tensor
]
=
None
,
variance_noise
:
Optional
[
torch
.
Tensor
]
=
None
,
...
...
src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
View file @
fe794894
...
@@ -787,7 +787,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin):
...
@@ -787,7 +787,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
generator
=
None
,
generator
=
None
,
variance_noise
:
Optional
[
torch
.
Tensor
]
=
None
,
variance_noise
:
Optional
[
torch
.
Tensor
]
=
None
,
...
...
src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
View file @
fe794894
...
@@ -927,7 +927,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -927,7 +927,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
generator
=
None
,
generator
=
None
,
return_dict
:
bool
=
True
,
return_dict
:
bool
=
True
,
...
...
src/diffusers/schedulers/scheduling_edm_dpmsolver_multistep.py
View file @
fe794894
...
@@ -594,7 +594,7 @@ class EDMDPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -594,7 +594,7 @@ class EDMDPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
generator
=
None
,
generator
=
None
,
return_dict
:
bool
=
True
,
return_dict
:
bool
=
True
,
...
...
src/diffusers/schedulers/scheduling_ipndm.py
View file @
fe794894
...
@@ -138,7 +138,7 @@ class IPNDMScheduler(SchedulerMixin, ConfigMixin):
...
@@ -138,7 +138,7 @@ class IPNDMScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
return_dict
:
bool
=
True
,
return_dict
:
bool
=
True
,
)
->
Union
[
SchedulerOutput
,
Tuple
]:
)
->
Union
[
SchedulerOutput
,
Tuple
]:
...
...
src/diffusers/schedulers/scheduling_unipc_multistep.py
View file @
fe794894
...
@@ -822,7 +822,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
...
@@ -822,7 +822,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin):
def
step
(
def
step
(
self
,
self
,
model_output
:
torch
.
Tensor
,
model_output
:
torch
.
Tensor
,
timestep
:
int
,
timestep
:
Union
[
int
,
torch
.
Tensor
]
,
sample
:
torch
.
Tensor
,
sample
:
torch
.
Tensor
,
return_dict
:
bool
=
True
,
return_dict
:
bool
=
True
,
)
->
Union
[
SchedulerOutput
,
Tuple
]:
)
->
Union
[
SchedulerOutput
,
Tuple
]:
...
...
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