Skip to content

Commit 6634c8f

Browse files
authored
Revive make quality (huggingface#203)
* Revive Make utils * Add datasets for training too
1 parent d4db4bb commit 6634c8f

File tree

13 files changed

+17
-18
lines changed

13 files changed

+17
-18
lines changed

dependency_versions_table.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
# 2. run `make deps_table_update``
44
deps = {
55
"Pillow": "Pillow",
6+
"accelerate": "accelerate>=0.11.0",
67
"black": "black~=22.0,>=22.3",
78
"filelock": "filelock",
89
"flake8": "flake8>=3.8.3",
10+
"hf-doc-builder": "hf-doc-builder>=0.3.0",
911
"huggingface-hub": "huggingface-hub",
1012
"importlib_metadata": "importlib_metadata",
1113
"isort": "isort>=5.5.4",
14+
"modelcards": "modelcards==0.1.4",
1215
"numpy": "numpy",
1316
"pytest": "pytest",
1417
"regex": "regex!=2019.12.17",
1518
"requests": "requests",
1619
"torch": "torch>=1.4",
1720
"tensorboard": "tensorboard",
18-
"modelcards": "modelcards==0.1.4",
1921
}

optimization.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from enum import Enum
1919
from typing import Optional, Union
2020

21-
import torch
2221
from torch.optim import Optimizer
2322
from torch.optim.lr_scheduler import LambdaLR
2423

pipelines/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from ..utils import is_inflect_available, is_transformers_available, is_unidecode_available
1+
# flake8: noqa
2+
# There's no way to ignore "F401 '...' imported but unused" warnings in this
3+
# module, but to preserve other warnings. So, don't check this module at all.
4+
5+
from ..utils import is_transformers_available
26
from .ddim import DDIMPipeline
37
from .ddpm import DDPMPipeline
48
from .latent_diffusion_uncond import LDMPipeline

pipelines/ddim/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# flake8: noqa
12
from .pipeline_ddim import DDIMPipeline

pipelines/ddpm/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# flake8: noqa
12
from .pipeline_ddpm import DDPMPipeline

pipelines/latent_diffusion/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# flake8: noqa
12
from ...utils import is_transformers_available
23

34

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# flake8: noqa
12
from .pipeline_latent_diffusion_uncond import LDMPipeline

pipelines/pndm/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# flake8: noqa
12
from .pipeline_pndm import PNDMPipeline

pipelines/score_sde_ve/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# flake8: noqa
12
from .pipeline_score_sde_ve import ScoreSdeVePipeline

pipelines/stable_diffusion/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# flake8: noqa
12
from ...utils import is_transformers_available
23

34

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# flake8: noqa
12
from .pipeline_stochastic_karras_ve import KarrasVePipeline

schedulers/scheduling_lms_discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import List, Union
15+
from typing import Union
1616

1717
import numpy as np
1818
import torch

utils/dummy_scipy_objects.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,3 @@ class LMSDiscreteScheduler(metaclass=DummyObject):
88

99
def __init__(self, *args, **kwargs):
1010
requires_backends(self, ["scipy"])
11-
12-
13-
class LDMTextToImagePipeline(metaclass=DummyObject):
14-
_backends = ["scipy"]
15-
16-
def __init__(self, *args, **kwargs):
17-
requires_backends(self, ["scipy"])
18-
19-
20-
class StableDiffusionPipeline(metaclass=DummyObject):
21-
_backends = ["scipy"]
22-
23-
def __init__(self, *args, **kwargs):
24-
requires_backends(self, ["scipy"])

0 commit comments

Comments
 (0)