Skip to content

Missing transformers requirement #10

Description

@LysandreJik

Dependencies don't mention transformers

diffusers/setup.py

Lines 78 to 91 in 850d434

_deps= [
"Pillow",
"black~=22.0,>=22.3",
"filelock",
"flake8>=3.8.3",
"huggingface-hub",
"isort>=5.5.4",
"numpy",
"pytest",
"regex!=2019.12.17",
"requests",
"torch>=1.4",
"torchvision",
]

However, importing from the quickstart fails without transformers installed:

In [1]: importtorchIn [2]: fromdiffusersimportUNetModel, DDPMSchedulerEinopsisnotinstalledEinopsisnotinstalled---------------------------------------------------------------------------ModuleNotFoundErrorTraceback (mostrecentcalllast)
InputIn [2], in<cellline: 1>()
---->1fromdiffusersimportUNetModel, DDPMSchedulerFile~/Workspaces/Python/diffusers/src/diffusers/__init__.py:13, in<module>11from .models.unet_grad_ttsimportUNetGradTTSModel12from .pipeline_utilsimportDiffusionPipeline--->13from .pipelinesimportDDIM, DDPM, GLIDE, LatentDiffusion, PNDM, BDDM14from .schedulersimportDDIMScheduler, DDPMScheduler, SchedulerMixin, PNDMScheduler15from .schedulers.classifier_free_guidanceimportClassifierFreeGuidanceSchedulerFile~/Workspaces/Python/diffusers/src/diffusers/pipelines/__init__.py:4, in<module>2from .pipeline_ddpmimportDDPM3from .pipeline_pndmimportPNDM---->4from .pipeline_glideimportGLIDE5from .pipeline_latent_diffusionimportLatentDiffusion6from .pipeline_bddmimportBDDMFile~/Workspaces/Python/diffusers/src/diffusers/pipelines/pipeline_glide.py:27, in<module>24fromtorchimportnn26importtqdm--->27fromtransformersimportCLIPConfig, CLIPModel, CLIPTextConfig, CLIPVisionConfig, GPT2Tokenizer28fromtransformers.activationsimportACT2FN29fromtransformers.modeling_outputsimportBaseModelOutput, BaseModelOutputWithPoolingModuleNotFoundError: Nomodulenamed'transformers'

Is the end goal to have transformers as a hard or soft dependency?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions