|
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | 15 | import inspect |
16 | | -from typing import Any, Callable, Dict, List, Optional, Union, Tuple |
| 16 | +from typing import Any, Callable, Dict, List, Optional, Union |
| 17 | + |
17 | 18 | import numpy as np |
18 | 19 | import torch |
19 | 20 | from transformers import ( |
| 21 | + CLIPImageProcessor, |
20 | 22 | CLIPTextModel, |
21 | 23 | CLIPTokenizer, |
| 24 | + CLIPVisionModelWithProjection, |
22 | 25 | T5EncoderModel, |
23 | 26 | T5TokenizerFast, |
24 | | - CLIPVisionModelWithProjection, |
25 | | - CLIPImageProcessor |
26 | 27 | ) |
27 | | -from diffusers.pipelines.flux.pipeline_output import FluxPipelineOutput |
28 | | -from diffusers.image_processor import VaeImageProcessor, PipelineImageInput |
29 | | -from diffusers.loaders import FluxLoraLoaderMixin, TextualInversionLoaderMixin, FromSingleFileMixin, FluxIPAdapterMixin |
| 28 | + |
| 29 | +from diffusers.image_processor import PipelineImageInput, VaeImageProcessor |
| 30 | +from diffusers.loaders import FluxIPAdapterMixin, FluxLoraLoaderMixin, FromSingleFileMixin, TextualInversionLoaderMixin |
30 | 31 | from diffusers.models.autoencoders import AutoencoderKL |
31 | 32 | from diffusers.models.transformers import FluxTransformer2DModel |
| 33 | +from diffusers.pipelines.flux.pipeline_output import FluxPipelineOutput |
| 34 | +from diffusers.pipelines.pipeline_utils import DiffusionPipeline |
32 | 35 | from diffusers.schedulers import FlowMatchEulerDiscreteScheduler |
33 | 36 | from diffusers.utils import ( |
34 | 37 | USE_PEFT_BACKEND, |
|
39 | 42 | unscale_lora_layers, |
40 | 43 | ) |
41 | 44 | from diffusers.utils.torch_utils import randn_tensor |
42 | | -from diffusers.pipelines.pipeline_utils import DiffusionPipeline |
| 45 | + |
43 | 46 |
|
44 | 47 | if is_torch_xla_available(): |
45 | 48 | import torch_xla.core.xla_model as xm |
|
57 | 60 | >>> from diffusers import DiffusionPipeline |
58 | 61 |
|
59 | 62 | >>> pipe = DiffusionPipeline.from_pretrained( |
60 | | - >>> "black-forest-labs/FLUX.1-dev", |
| 63 | + >>> "black-forest-labs/FLUX.1-dev", |
61 | 64 | >>> custom_pipeline="pipeline_flux_semantic_guidance", |
62 | 65 | >>> torch_dtype=torch.bfloat16 |
63 | 66 | >>> ) |
|
0 commit comments