Coder Social home page Coder Social logo

Comments (8)

BorzoiEnjoyer avatar BorzoiEnjoyer commented on August 11, 2024 5

Same here, i managed to fix the issue with a bit of GPT magic

By changing code in 851 line */venv/Lib/Site-Packages/gradio/utils.py

from

def is_special_typed_parameter(name):
    from gradio.helpers import EventData
    from gradio.routes import Request

    """Checks if parameter has a type hint designating it as a gr.Request or gr.EventData"""
    is_request = parameter_types.get(name, "") == Request
    # use int in the fall-back as that will always be false
    is_event_data = issubclass(parameter_types.get(name, int), EventData)
    return is_request or is_event_data

To

def is_special_typed_parameter(name):
    from gradio.helpers import EventData
    from gradio.routes import Request

    """Checks if parameter has a type hint designating it as a gr.Request or gr.EventData"""
    parameter_type = parameter_types.get(name, None)
    is_request = parameter_type == Request
    is_event_data = False
    if parameter_type and isinstance(parameter_type, type):
        is_event_data = issubclass(parameter_type, EventData)
    return is_request or is_event_data

from stable-diffusion-webui-dataset-tag-editor.

Mike1932 avatar Mike1932 commented on August 11, 2024 2

Same issue.

from stable-diffusion-webui-dataset-tag-editor.

toshiaki1729 avatar toshiaki1729 commented on August 11, 2024 2

With small fix, it's working with the latest SD webUI in my environment.

ss

from stable-diffusion-webui-dataset-tag-editor.

iconnoci avatar iconnoci commented on August 11, 2024

Same issue.

from stable-diffusion-webui-dataset-tag-editor.

YKefasu avatar YKefasu commented on August 11, 2024

same on Vlad fork Version: eaea88a Mon May 1 21:03:08 2023 -0400

Loading theme: gradio/default
executing callback: C:\New folder\automatic\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\main.py
ui_tabs_callback: TypeError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\New folder\automatic\modules\script_callbacks.py:142 in ui_tabs_callback                                          │
│                                                                                                                      │
│   141 │   │   try:                                                                                                   │
│ ❱ 142 │   │   │   res += c.callback() or []                                                                          │
│   143 │   │   except Exception as e:                                                                                 │
│                                                                                                                      │
│ C:\New folder\automatic\extensions\stable-diffusion-webui-dataset-tag-editor\scripts\main.py:332 in on_ui_tabs       │
│                                                                                                                      │
│   331 │   │   ui.filter_by_selection.set_callbacks(o_update_filter_and_gallery, ui.dataset_gal                       │
│ ❱ 332 │   │   ui.batch_edit_captions.set_callbacks(o_update_filter_and_gallery, ui.load_datase                       │
│   333 │   │   ui.edit_caption_of_selected_image.set_callbacks(o_update_filter_and_gallery, ui.                       │
│                                                                                                                      │
│                                               ... 4 frames hidden ...                                                │
│                                                                                                                      │
│ C:\New folder\automatic\venv\lib\site-packages\gradio\utils.py:869 in check_function_inputs_match                    │
│                                                                                                                      │
│    868 │   │   if param.kind in [param.POSITIONAL_ONLY, param.POSITIONAL_OR_KEYWORD]:                                │
│ ❱  869 │   │   │   if not is_special_typed_parameter(name):                                                          │
│    870 │   │   │   │   if not has_default:                                                                           │
│                                                                                                                      │
│ C:\New folder\automatic\venv\lib\site-packages\gradio\utils.py:858 in is_special_typed_parameter                     │
│                                                                                                                      │
│    857 │   │   # use int in the fall-back as that will always be false                                               │
│ ❱  858 │   │   is_event_data = issubclass(parameter_types.get(name, int), EventData)                                 │
│    859 │   │   return is_request or is_event_data                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: issubclass() arg 1 must be a class
Running on local URL:  http://127.0.0.1:7861

from stable-diffusion-webui-dataset-tag-editor.

toshiaki1729 avatar toshiaki1729 commented on August 11, 2024

gradio update, came across to another bug.
It seems just the same thing as #62?

from stable-diffusion-webui-dataset-tag-editor.

toshiaki1729 avatar toshiaki1729 commented on August 11, 2024

Isn't it working much faster than the previous gradio 3.23.0?
good boy gradio 3.28.1

from stable-diffusion-webui-dataset-tag-editor.

gydmg avatar gydmg commented on August 11, 2024

this is the error on broswer
python:3.10.11  •  torch: 2.0.0+cu118  •  xformers: 0.0.19  •  gradio: 3.28.1  •  commit: [5ab7f213]

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'value')
at setup (tagAutocomplete.js?1677481088.0:814:38)

from stable-diffusion-webui-dataset-tag-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.