diff --git a/download_supported_configs.py b/download_supported_configs.py deleted file mode 100644 index 50fc9902..00000000 --- a/download_supported_configs.py +++ /dev/null @@ -1,24 +0,0 @@ -import os -import shutil - -from diffusers.loaders.single_file_utils import DIFFUSERS_DEFAULT_PIPELINE_PATHS -from huggingface_hub import snapshot_download - - -token = None -DIFFUSERS_DEFAULT_PIPELINE_PATHS['Kolor'] = {"pretrained_model_name_or_path": "Kwai-Kolors/Kolors"} -DIFFUSERS_DEFAULT_PIPELINE_PATHS['hunyuan'] = {"pretrained_model_name_or_path": "Tencent-Hunyuan/HunyuanDiT-Diffusers"} -DIFFUSERS_DEFAULT_PIPELINE_PATHS['flux'] = {"pretrained_model_name_or_path": "black-forest-labs/FLUX.1-dev"} -DIFFUSERS_DEFAULT_PIPELINE_PATHS['flux_schnell'] = {"pretrained_model_name_or_path": "black-forest-labs/FLUX.1-schnell"} - -for config_name, config in DIFFUSERS_DEFAULT_PIPELINE_PATHS.items(): - try: - pretrained_model_name_or_path = config["pretrained_model_name_or_path"] - local_dir = os.path.join('backend', 'huggingface', pretrained_model_name_or_path) - os.makedirs(local_dir, exist_ok=True) - snapshot_download(pretrained_model_name_or_path, local_dir=local_dir, allow_patterns=['*.json', '*.txt'], - token=token, force_download=True) - shutil.rmtree(os.path.join(local_dir, '.cache')) - print(pretrained_model_name_or_path) - except Exception as e: - print(e) diff --git a/pyproject.toml b/pyproject.toml index 214aa794..22fbb401 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,42 +1,7 @@ +[tool.black] +line-length = 1024 + [tool.ruff] - -target-version = "py39" - -[tool.ruff.lint] - -extend-select = [ - "B", - "C", - "I", - "W", -] - -exclude = [ - "extensions", - "extensions-disabled", - "modules_forge", - "modules", - "ldm_patched", - "extensions-builtin", -] - -ignore = [ - "E501", # Line too long - "E721", # Do not compare types, use `isinstance` - "E731", # Do not assign a `lambda` expression, use a `def` - - "I001", # Import block is un-sorted or un-formatted - "C901", # Function is too complex - "C408", # Rewrite as a literal - "W605", # invalid escape sequence, messes with some docstrings -] - -[tool.ruff.lint.per-file-ignores] -"webui.py" = ["E402"] # Module level import not at top of file - -[tool.ruff.lint.flake8-bugbear] -# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`. -extend-immutable-calls = ["fastapi.Depends", "fastapi.security.HTTPBasic"] - -[tool.pytest.ini_options] -base_url = "http://127.0.0.1:7860" +target-version = "py311" +exclude = ["extensions"] +lint.select = ["N805", "S307", "S102", "T", "W", "F"]