Repository navigation
Missing transformers requirement #10
Copy link
Copy link
Closed
Description
Dependencies don't mention transformers
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]: import torch
In [2]: from diffusers import UNetModel, DDPMScheduler
Einops is not installed
Einops is not installed
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 from diffusers import UNetModel, DDPMScheduler
File ~/Workspaces/Python/diffusers/src/diffusers/__init__.py:13, in <module>
11 from .models.unet_grad_tts import UNetGradTTSModel
12 from .pipeline_utils import DiffusionPipeline
---> 13 from .pipelines import DDIM, DDPM, GLIDE, LatentDiffusion, PNDM, BDDM
14 from .schedulers import DDIMScheduler, DDPMScheduler, SchedulerMixin, PNDMScheduler
15 from .schedulers.classifier_free_guidance import ClassifierFreeGuidanceScheduler
File ~/Workspaces/Python/diffusers/src/diffusers/pipelines/__init__.py:4, in <module>
2 from .pipeline_ddpm import DDPM
3 from .pipeline_pndm import PNDM
----> 4 from .pipeline_glide import GLIDE
5 from .pipeline_latent_diffusion import LatentDiffusion
6 from .pipeline_bddm import BDDM
File ~/Workspaces/Python/diffusers/src/diffusers/pipelines/pipeline_glide.py:27, in <module>
24 from torch import nn
26 import tqdm
---> 27 from transformers import CLIPConfig, CLIPModel, CLIPTextConfig, CLIPVisionConfig, GPT2Tokenizer
28 from transformers.activations import ACT2FN
29 from transformers.modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling
ModuleNotFoundError: No module named 'transformers'Is the end goal to have transformers as a hard or soft dependency?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
patrickvonplaten commentedon Jun 15, 2022
Thanks we should def make this a soft dependency
anton-l commentedon Jun 22, 2022
Using dummy imports now instead of hard dependencies and try-catch blocks, thanks to Patrick ff885b0
Merge pull request huggingface#10 from Dango233/230327
Merge pull request huggingface#10 from dotieuthien/add-convert-tensorrt
Merge pull request #10 from scxue/feat/sa-solver
Merge pull request #10 from huggingface/yiyi-test-guidance-pipe
Merge pull request #10 from huggingface/make-scheduler-consistent
combine #10 into #8
[agents docs] add float64 gotcha (#13472)
[agents docs] add float64 gotcha (huggingface#13472)
refactor(dreamlite): address review feedback from huggingface#13815
[.ai] fix dangling pitfalls ref and broaden self-review scope
[Pipelines] Add DreamLite text-to-image and image-edit pipelines (#13815
[.ai] add self-review skill (#13917)
[Pipelines] Add DreamLite text-to-image and image-edit pipelines (#13815
[.ai] add self-review skill (#13917)