Unverified Commit 8d2c582e authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge pull request #8797 from ArrowM/master

Move `load_file_from_url` import
parents c0a7ff80 00bd271f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,6 @@ import shutil
import importlib
import importlib
from urllib.parse import urlparse
from urllib.parse import urlparse


from basicsr.utils.download_util import load_file_from_url
from modules import shared
from modules import shared
from modules.upscaler import Upscaler, UpscalerLanczos, UpscalerNearest, UpscalerNone
from modules.upscaler import Upscaler, UpscalerLanczos, UpscalerNearest, UpscalerNone
from modules.paths import script_path, models_path
from modules.paths import script_path, models_path
@@ -59,6 +58,7 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None


        if model_url is not None and len(output) == 0:
        if model_url is not None and len(output) == 0:
            if download_name is not None:
            if download_name is not None:
                from basicsr.utils.download_util import load_file_from_url
                dl = load_file_from_url(model_url, model_path, True, download_name)
                dl = load_file_from_url(model_url, model_path, True, download_name)
                output.append(dl)
                output.append(dl)
            else:
            else: