Skip to content

fix wan ftfy import #11262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
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
6 changes: 4 additions & 2 deletions src/diffusers/pipelines/wan/pipeline_wan.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import html
from typing import Any, Callable, Dict, List, Optional, Union

import ftfy
import regex as re
import torch
from transformers import AutoTokenizer, UMT5EncoderModel
Expand All @@ -24,7 +23,7 @@
from ...loaders import WanLoraLoaderMixin
from ...models import AutoencoderKLWan, WanTransformer3DModel
from ...schedulers import FlowMatchEulerDiscreteScheduler
from ...utils import is_torch_xla_available, logging, replace_example_docstring
from ...utils import is_ftfy_available, is_torch_xla_available, logging, replace_example_docstring
from ...utils.torch_utils import randn_tensor
from ...video_processor import VideoProcessor
from ..pipeline_utils import DiffusionPipeline
Expand All @@ -40,6 +39,9 @@

logger = logging.get_logger(__name__) # pylint: disable=invalid-name

if is_ftfy_available():
import ftfy


EXAMPLE_DOC_STRING = """
Examples:
Expand Down
6 changes: 4 additions & 2 deletions src/diffusers/pipelines/wan/pipeline_wan_i2v.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import html
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

import ftfy
import PIL
import regex as re
import torch
Expand All @@ -26,7 +25,7 @@
from ...loaders import WanLoraLoaderMixin
from ...models import AutoencoderKLWan, WanTransformer3DModel
from ...schedulers import FlowMatchEulerDiscreteScheduler
from ...utils import is_torch_xla_available, logging, replace_example_docstring
from ...utils import is_ftfy_available, is_torch_xla_available, logging, replace_example_docstring
from ...utils.torch_utils import randn_tensor
from ...video_processor import VideoProcessor
from ..pipeline_utils import DiffusionPipeline
Expand All @@ -42,6 +41,9 @@

logger = logging.get_logger(__name__) # pylint: disable=invalid-name

if is_ftfy_available():
import ftfy

EXAMPLE_DOC_STRING = """
Examples:
```python
Expand Down
6 changes: 4 additions & 2 deletions src/diffusers/pipelines/wan/pipeline_wan_video2video.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import inspect
from typing import Any, Callable, Dict, List, Optional, Union

import ftfy
import regex as re
import torch
from PIL import Image
Expand All @@ -26,7 +25,7 @@
from ...loaders import WanLoraLoaderMixin
from ...models import AutoencoderKLWan, WanTransformer3DModel
from ...schedulers import FlowMatchEulerDiscreteScheduler
from ...utils import is_torch_xla_available, logging, replace_example_docstring
from ...utils import is_ftfy_available, is_torch_xla_available, logging, replace_example_docstring
from ...utils.torch_utils import randn_tensor
from ...video_processor import VideoProcessor
from ..pipeline_utils import DiffusionPipeline
Expand All @@ -42,6 +41,9 @@

logger = logging.get_logger(__name__) # pylint: disable=invalid-name

if is_ftfy_available():
import ftfy


EXAMPLE_DOC_STRING = """
Examples:
Expand Down
Loading