AUTOMATIC1111/stable-diffusion-webui · error · ValueError
Unable to find model info: {path}
Error message
Unable to find model info: {path} What it means
The RealESRGAN loader iterates its registered scalers looking for one whose scaler.data_path equals the requested path; if no registered UpscalerData matches, ValueError 'Unable to find model info' is raised. It means the requested RealESRGAN model name/path is not among the built-in entries (General 4xV3, General WDN 4xV3, x4plus, x4plus-anime-6B, x2plus, etc.).
Source
Thrown at modules/realesrgan_model.py:64
model_descriptor,
img,
tile_size=opts.ESRGAN_tile,
tile_overlap=opts.ESRGAN_tile_overlap,
# TODO: `outscale`?
)
def load_model(self, path):
for scaler in self.scalers:
if scaler.data_path == path:
if scaler.local_data_path.startswith("http"):
scaler.local_data_path = modelloader.load_file_from_url(
scaler.data_path,
model_dir=self.model_download_path,
)
if not os.path.exists(scaler.local_data_path):
raise FileNotFoundError(f"RealESRGAN data missing: {scaler.local_data_path}")
return scaler
raise ValueError(f"Unable to find model info: {path}")
def get_realesrgan_models(scaler: UpscalerRealESRGAN):
return [
UpscalerData(
name="R-ESRGAN General 4xV3",
path="https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth",
scale=4,
upscaler=scaler,
),
UpscalerData(
name="R-ESRGAN General WDN 4xV3",
path="https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-wdn-x4v3.pth",
scale=4,
upscaler=scaler,
),
UpscalerData(
name="R-ESRGAN AnimeVideo",
View on GitHub (pinned to 82a973c043)
Solutions
- Use one of the registered RealESRGAN model names/paths (check get_realesrgan_models: 'R-ESRGAN General 4xV3', 'R-ESRGAN General WDN 4xV3', 'R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B', 'R-ESRGAN 2x+').
- For arbitrary local upscaler weights, use the ESRGAN/general upscaler path or add an UpscalerData entry rather than RealESRGAN.
- Pick the model via the UI dropdown so the exact registered value is used.
Example fix
# before upscale_with_model(realesrgan, path='models/RealESRGAN/my_custom.pth') # ValueError # after upscale_with_model(realesrgan, path='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth') # registered data_path
Defensive patterns
Strategy: validation
Validate before calling
def known_realesrgan_path(scalers, path):
return any(s.data_path == path for s in scalers)
if not known_realesrgan_path(upscaler.scalers, requested_path):
raise ValueError(f'{requested_path!r} is not a registered RealESRGAN model; '
f'valid: {[s.data_path for s in upscaler.scalers]}') Type guard
def is_registered_realesrgan(scalers, path: str) -> bool:
return any(s.data_path == path for s in scalers) Try / catch
try:
scaler = upscaler.load_model(path)
except ValueError as e:
if 'Unable to find model info' in str(e):
# fall back to a registered default entry
scaler = upscaler.load_model(upscaler.scalers[0].data_path)
else:
raise Prevention
- Drive selection from the registered scaler list (or the UI dropdown), never free-text paths.
- For custom local weights use the generic ESRGAN upscaler, not RealESRGAN.
When it happens
Trigger: Calling the RealESRGAN upscaler with a custom path/name string that differs from every registered scaler.data_path — e.g. a local file path passed where a registered URL/path is expected.
Common situations: Scripts or extensions passing an arbitrary .pth path to the RealESRGAN upscaler instead of using its registered names; renaming/moving model files so data_path no longer matches the request.
Related errors
- could not find upscaler named {self.hr_upscaler}
- RealESRGAN data missing: {scaler.local_data_path}
- Sampler not found
- Invalid encoded image
- always on script {alwayson_script_name} not found
AI-assisted analysis of AUTOMATIC1111/stable-diffusion-webui@82a973c043 (2026-08-14).
Data as JSON: /api/errors/7fee2faf21da0413.
Report an issue: GitHub.