[BUG] After reloding, `on_filter_update_callbacks` was not cleared
Closed this issue ยท 6 comments
If you set
- analytics_enabled=False
+ analytics_enabled=True
And reload UI, you will notice that.
This is because the following two lists were not cleared after restarting
ui.filter_by_tags.tag_filter_ui.on_filter_update_callbacks
ui.filter_by_tags.tag_filter_ui_neg.on_filter_update_callbacks
So it will add callback function for the previous Gradio.Blocks components.
That will be found by Gradio analytics, and raise error.
self.tag_filter_ui.set_callbacks()
self.tag_filter_ui_neg.set_callbacks()
I think this script doesn't have reloading feature.
I wonder how you could do?
By the way, Gradio has already fixed it gradio-app/gradio#4642
I use your repository while creating WSH032/sd-webui-fast-dataset-maker, and at that time I discovered this issue
I fix it by this way
https://github.com/WSH032/dataset-tag-editor-standalone/blob/ec8617609c38888b24b04593751e2c2e056242d3/scripts/tab_main.py#L517C1-L520C76
And, your repository is really awesome.
I think this script doesn't have reloading feature.
Confirmed: I don't know anything about my script
Anyway, thank you so much for utilizing this repository.
By the way, Gradio has already fixed it gradio-app/gradio#4642
I understand that it will be fixed, but I will look into it in more detail just to be sure.
Thank you.
Great!
I still hava another issue, have you noticed that if don't enable thumbnails, loading will become incredibly slow
And once too many images are loaded, the tag filter will no longer work
Should I open another issue?
I've updated gradio to 4.28.3 in >= ver0.0.6.
And the issue when loading many images may be solved.
I'm grad if you can check it.