Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/diffusers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@
"VQDiffusionPipeline",
"WanImageToVideoPipeline",
"WanPipeline",
"WanTextToImagePipeline",
"WanVACEPipeline",
"WanVideoToVideoPipeline",
"WuerstchenCombinedPipeline",
Expand Down Expand Up @@ -1221,6 +1222,7 @@
VQDiffusionPipeline,
WanImageToVideoPipeline,
WanPipeline,
WanTextToImagePipeline,
WanVACEPipeline,
WanVideoToVideoPipeline,
WuerstchenCombinedPipeline,
Expand Down
4 changes: 2 additions & 2 deletions src/diffusers/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"WuerstchenDecoderPipeline",
"WuerstchenPriorPipeline",
]
_import_structure["wan"] = ["WanPipeline", "WanImageToVideoPipeline", "WanVideoToVideoPipeline", "WanVACEPipeline"]
_import_structure["wan"] = ["WanPipeline", "WanImageToVideoPipeline", "WanVideoToVideoPipeline", "WanVACEPipeline", "WanTextToImagePipeline"]
_import_structure["skyreels_v2"] = [
"SkyReelsV2DiffusionForcingPipeline",
"SkyReelsV2DiffusionForcingImageToVideoPipeline",
Expand Down Expand Up @@ -764,7 +764,7 @@
UniDiffuserTextDecoder,
)
from .visualcloze import VisualClozeGenerationPipeline, VisualClozePipeline
from .wan import WanImageToVideoPipeline, WanPipeline, WanVACEPipeline, WanVideoToVideoPipeline
from .wan import WanImageToVideoPipeline, WanPipeline, WanVACEPipeline, WanVideoToVideoPipeline, WanTextToImagePipeline
from .wuerstchen import (
WuerstchenCombinedPipeline,
WuerstchenDecoderPipeline,
Expand Down
4 changes: 4 additions & 0 deletions src/diffusers/pipelines/wan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@

_dummy_objects.update(get_objects_from_module(dummy_torch_and_transformers_objects))
else:
_import_structure["pipeline_output"] = ["WanPipelineOutput", "WanImagePipelineOutput"]
_import_structure["pipeline_wan"] = ["WanPipeline"]
_import_structure["pipeline_wan_i2v"] = ["WanImageToVideoPipeline"]
_import_structure["pipeline_wan_vace"] = ["WanVACEPipeline"]
_import_structure["pipeline_wan_video2video"] = ["WanVideoToVideoPipeline"]
_import_structure["pipeline_wan_t2i"] = ["WanTextToImagePipeline"]
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
try:
if not (is_transformers_available() and is_torch_available()):
Expand All @@ -34,10 +36,12 @@
except OptionalDependencyNotAvailable:
from ...utils.dummy_torch_and_transformers_objects import *
else:
from .pipeline_output import WanPipelineOutput, WanImagePipelineOutput
from .pipeline_wan import WanPipeline
from .pipeline_wan_i2v import WanImageToVideoPipeline
from .pipeline_wan_vace import WanVACEPipeline
from .pipeline_wan_video2video import WanVideoToVideoPipeline
from .pipeline_wan_t2i import WanTextToImagePipeline

else:
import sys
Expand Down
15 changes: 15 additions & 0 deletions src/diffusers/pipelines/wan/pipeline_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@ class WanPipelineOutput(BaseOutput):
"""

frames: torch.Tensor


@dataclass
class WanImagePipelineOutput(BaseOutput):
r"""
Output class for Wan text-to-image pipelines.

Args:
images (`torch.Tensor`, `np.ndarray`, or List[PIL.Image.Image]):
List of image outputs - It can be a list of PIL images or a NumPy array or Torch tensor of shape
`(batch_size, channels, height, width)`. The tensor dimensions are automatically squeezed to remove
the temporal dimension for single-frame outputs.
"""

images: torch.Tensor
Loading