deepfakes/faceswap · error · ValueError
{extractor_type} is not a valid plugin type. Select from {li
Error message
{extractor_type} is not a valid plugin type. Select from {list(cls.extract_plugins)} What it means
Raised by PluginLoader.get_available_extract_plugins when the extractor_type argument is not a key of the extract_plugins registry. This is the list-producing API used by the GUI/CLI to populate plugin dropdowns, and it validates the category with the same ValueError as the loader itself.
Source
Thrown at plugins/plugin_loader.py:224
----------
extractor_type
The type of extractor to return the plugins for
add_none
Append "none" to the list of returned plugins. Default: False
extend_plugin
Some plugins have configuration options that mean that multiple 'pseudo-plugins'
can be generated based on their settings. An example of this is the bisenet-fp mask
which, whilst selected as 'bisenet-fp' can be stored as 'bisenet-fp-face' and
'bisenet-fp-head' depending on whether hair has been included in the mask or not.
``True`` will generate each pseudo-plugin, ``False`` will generate the original
plugin name. Default: ``False``
Returns
-------
A list of the available extractor plugin names for the given type
"""
if extractor_type not in cls.extract_plugins:
raise ValueError(f"{extractor_type} is not a valid plugin type. Select from "
f"{list(cls.extract_plugins)}")
plugins = [x.split(".")[-2].replace("_", "-") for x in cls.extract_plugins[extractor_type]]
if extend_plugin and extractor_type == "mask":
extendable = ["bisenet-fp", "custom"]
for plugin in extendable:
if plugin not in plugins:
continue
plugins.remove(plugin)
plugins.extend([f"{plugin}_face", f"{plugin}_head"])
plugins = sorted(plugins)
if add_none:
plugins.insert(0, "none")
return plugins
@staticmethod
def get_available_models() -> list[str]:
"""Return a list of available training models
View on GitHub (pinned to f530cb7508)
Solutions
- Pass one of the registry keys printed in the message (align, detect, mask, recognition).
- Re-use constants or fetch list(cls.extract_plugins) instead of hard-coding the category string.
- Prefer letting the GUI/CLI enumerate plugins rather than reimplementing it.
Example fix
# before
names = PluginLoader.get_available_extract_plugins('masks')
# after
names = PluginLoader.get_available_extract_plugins('mask') Defensive patterns
Strategy: type-guard
Validate before calling
from plugins.plugin_loader import PluginLoader assert extractor_type in PluginLoader.extract_plugins, "invalid extractor type"
Type guard
def is_valid_extractor_type(etype: str) -> bool:
from plugins.plugin_loader import PluginLoader
return etype in PluginLoader.extract_plugins Prevention
- Derive category names from list(cls.extract_plugins) instead of hard-coding strings.
- Let the GUI/CLI enumerate plugins; don't reimplement plugin discovery.
When it happens
Trigger: Calling PluginLoader.get_available_extract_plugins('invalid') — same category typos as error 50 ('alignment', 'masks' plural, etc.) — typically from custom tooling or scripts that enumerate plugins.
Common situations: Custom launchers/scripts enumerating plugins with a guessed category name; code drift after a Faceswap upgrade renamed categories.
Related errors
- {plugin_type} is not a valid plugin type. Select from {list(
- {name} is not a valid {plugin_type} plugin. Select from {mod
- Landmark based masks cannot be created for {self._landmark_t
- Alignments file not found at {self._file}
- No display detected. GUI mode has been disabled.
AI-assisted analysis of deepfakes/faceswap@f530cb7508 (2026-08-15).
Data as JSON: /api/errors/fd125a3ac6d44019.
Report an issue: GitHub.