diff --git a/modules/scripts.py b/modules/scripts.py index 99bf836af..49e4a6110 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -1,6 +1,7 @@ import os import re import sys +import inspect from collections import namedtuple import gradio as gr @@ -249,7 +250,7 @@ def load_scripts(): def register_scripts_from_module(module): for script_class in module.__dict__.values(): - if type(script_class) != type: + if not inspect.isclass(script_class): continue if issubclass(script_class, Script):