lint, give civitai client a name
This commit is contained in:
parent
ebb5a586ce
commit
e052578a20
|
@ -16,7 +16,9 @@ CIVITAI_ROOT = "https://civitai.com/api/download/models/%s"
|
||||||
|
|
||||||
|
|
||||||
class CivitaiClient(BaseClient):
|
class CivitaiClient(BaseClient):
|
||||||
|
name = "civitai"
|
||||||
protocol = "civitai://"
|
protocol = "civitai://"
|
||||||
|
|
||||||
root: str
|
root: str
|
||||||
token: Optional[str]
|
token: Optional[str]
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ from ..utils import (
|
||||||
build_cache_paths,
|
build_cache_paths,
|
||||||
download_progress,
|
download_progress,
|
||||||
get_first_exists,
|
get_first_exists,
|
||||||
remove_prefix,
|
|
||||||
)
|
)
|
||||||
from .base import BaseClient
|
from .base import BaseClient
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from huggingface_hub import snapshot_download
|
|
||||||
from huggingface_hub.file_download import hf_hub_download
|
from huggingface_hub.file_download import hf_hub_download
|
||||||
|
|
||||||
from ..utils import ConversionContext, remove_prefix
|
from ..utils import ConversionContext, remove_prefix
|
||||||
|
|
|
@ -384,7 +384,7 @@ def build_cache_paths(
|
||||||
if format is not None:
|
if format is not None:
|
||||||
basename = path.basename(name)
|
basename = path.basename(name)
|
||||||
_filename, ext = path.splitext(basename)
|
_filename, ext = path.splitext(basename)
|
||||||
if ext is None or ext == '':
|
if ext is None or ext == "":
|
||||||
name = f"{name}.{format}"
|
name = f"{name}.{format}"
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
|
|
Loading…
Reference in New Issue