mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 03:10:21 +00:00
Move load_file_from_url
to modelloader
This commit is contained in:
@@ -2,7 +2,6 @@ import os
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from basicsr.utils.download_util import load_file_from_url
|
||||
from realesrgan import RealESRGANer
|
||||
|
||||
from modules.upscaler import Upscaler, UpscalerData
|
||||
@@ -10,6 +9,7 @@ from modules.shared import cmd_opts, opts
|
||||
from modules import modelloader, errors
|
||||
|
||||
|
||||
|
||||
class UpscalerRealESRGAN(Upscaler):
|
||||
def __init__(self, path):
|
||||
self.name = "RealESRGAN"
|
||||
@@ -71,7 +71,7 @@ class UpscalerRealESRGAN(Upscaler):
|
||||
return None
|
||||
|
||||
if info.local_data_path.startswith("http"):
|
||||
info.local_data_path = load_file_from_url(url=info.data_path, model_dir=self.model_download_path, progress=True)
|
||||
info.local_data_path = modelloader.load_file_from_url(info.data_path, model_dir=self.model_download_path)
|
||||
|
||||
return info
|
||||
except Exception:
|
||||
|
Reference in New Issue
Block a user