mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
guard omnigen processor. (#11799)
This commit is contained in:
@@ -23,12 +23,14 @@ from ...image_processor import PipelineImageInput, VaeImageProcessor
|
||||
from ...models.autoencoders import AutoencoderKL
|
||||
from ...models.transformers import OmniGenTransformer2DModel
|
||||
from ...schedulers import FlowMatchEulerDiscreteScheduler
|
||||
from ...utils import is_torch_xla_available, logging, replace_example_docstring
|
||||
from ...utils import is_torch_xla_available, is_torchvision_available, logging, replace_example_docstring
|
||||
from ...utils.torch_utils import randn_tensor
|
||||
from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
|
||||
from .processor_omnigen import OmniGenMultiModalProcessor
|
||||
|
||||
|
||||
if is_torchvision_available():
|
||||
from .processor_omnigen import OmniGenMultiModalProcessor
|
||||
|
||||
if is_torch_xla_available():
|
||||
XLA_AVAILABLE = True
|
||||
else:
|
||||
|
||||
@@ -18,7 +18,12 @@ from typing import Dict, List
|
||||
import numpy as np
|
||||
import torch
|
||||
from PIL import Image
|
||||
from torchvision import transforms
|
||||
|
||||
from ...utils import is_torchvision_available
|
||||
|
||||
|
||||
if is_torchvision_available():
|
||||
from torchvision import transforms
|
||||
|
||||
|
||||
def crop_image(pil_image, max_image_size):
|
||||
|
||||
Reference in New Issue
Block a user