Commit bedcd2f3 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #11264 from huchenlei/meta_class

🐛 Allow Script to have custom metaclass
parents 2c43dd76 58a9a261
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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment