-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
what should I do? ->Older versions of gradio may not work ( issubclass() arg 1 must be a class) ? #5
Comments
I got the same error. Could this be due to using an older version of A1111? My A1111 is from Apr, 26. All other extensions are disabled |
Yes this could be it. I am using a1111 1.5.1 right now. I'm not sure about older versions. In any case, it looks like a gradio problem. If I have more information about what you're trying to do and when the bug happens, I can try looking. |
I tried downgrading and upgrading the Gradio version. It didn't help me |
Ok, i will try to investigate further. Thanks for trying. Sometimes the problem comes from the ui-config.json file at the root of sd, which is not properly updated. In this case, you need to rename it (and restart) so that it can be rebuilt and see if it works better. This might to be related to that : gradio-app/gradio#3514 What version of python are you using ? Currently i have : Note that using python 3.11 is a bad idea (but i am doing it for test purposes). |
Deleting ui-config.json did not help. The default ui-config.json has the same problem. I have : I use the old version because torch2 doesn't work well for me. My video card is weak and works better with torch1 |
I don't think it comes from torch. But it could comes from gradio :/ Will see if next versions still has this problem. |
I just installed the program from scratch
Switch to old version
Installed Faceswaplab from URL Same problem for new installation |
Thx for trying. What version of gradio is used in this version ? I use type annotations a lot to check code. This is typically the thing that crashes older versions of gradio. I haven't noticed any problems with version 3.32. |
gradio-3.23.0 But I can try to update gradio again |
It's the same version as mine, so I don't see why it would crash. At the moment I'm a bit short of ideas. Is it just the tab, or does it really concern the whole extension? Do you have the accordion in the other panels? |
No, your version is 3.32, not 3.23 =) Everything works, I have accordion in the other panels and section in settings. But I haven't tab |
Okay, I figured out why the gradio update didn't work. A1111 puts the old version on startup Well, I will use it without the tab |
If gradio is really a problem, I could remove the type annotations. But it's a pain to degrade code quality because of that. I'll leave the issue open to see if that's really where the problem lies. |
I can remove the type annotations for me only. But I don't know what I need delete |
If you have the time, you can give it a try. That way we'll know for sure. In the file : For each function, for example : def extract_faces(
files: List[gr.File],
extract_path: Optional[str],
*components: List[gr.components.Component],
) -> Optional[List[Image.Image]]: You can remove the annotation types like this : def extract_faces(
files,
extract_path,
*components,
) |
Thank you. It works |
Thanks for your feedback |
Hello, could someone help me update Gradio? I have this problem. |
You can simply delete the gradio folders in the venv\Lib\site-packages directory and automatic1111 will download the required version. But if you are using an older version of automatic1111, the version of gradio may not change |
Error executing callback ui_tabs_callback for C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\extensions\sd-webui-faceswaplab\scripts\faceswaplab.py
Traceback (most recent call last):
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\modules\script_callbacks.py", line 134, in ui_tabs_callback
res += c.callback() or []
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\extensions\sd-webui-faceswaplab\scripts\faceswaplab_ui\faceswaplab_tab.py", line 454, in on_ui_tabs
tools_ui()
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\extensions\sd-webui-faceswaplab\scripts\faceswaplab_ui\faceswaplab_tab.py", line 433, in tools_ui
extract_btn.click(
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\venv\lib\site-packages\gradio\events.py", line 132, in call
dep, dep_index = self.trigger.set_event_trigger(
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\venv\lib\site-packages\gradio\blocks.py", line 217, in set_event_trigger
check_function_inputs_match(fn, inputs, inputs_as_dict)
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\venv\lib\site-packages\gradio\utils.py", line 869, in check_function_inputs_match
if not is_special_typed_parameter(name):
File "C:\picture\Ai\app\stable-diffusion-webui\stable-diffusion-webui-9523\venv\lib\site-packages\gradio\utils.py", line 858, in is_special_typed_parameter
is_event_data = issubclass(parameter_types.get(name, int), EventData)
TypeError: issubclass() arg 1 must be a class
The text was updated successfully, but these errors were encountered: