Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

Colab; infer-web.py have an issue with gradio

Open alexledd opened this issue 2 years ago • 4 comments

Input: !python3 infer-web.py --colab --pycmd python3

Output:

Traceback (most recent call last):
  File "/content/Retrieval-based-Voice-Conversion-WebUI/infer-web.py", line 96, in <module>
    class ToolButton(gr.Button, gr.components.FormComponent):
AttributeError: module 'gradio.components' has no attribute 'FormComponent'. Did you mean: 'IOComponent'?

alexledd avatar Jun 16 '23 01:06 alexledd

Same issue, I hope this gets fixed soon...

ITAC85v2 avatar Jun 16 '23 02:06 ITAC85v2

Same issue here!

Echoden-sys avatar Jun 16 '23 02:06 Echoden-sys

Edit: The solution right below this comment is simpler and persists across sessions, so use that instead!

I fixed this by changing the offending line in infer-web.py to use gr.components.IOComponent instead.

Open the file browser on the left panel, open up the Retrieval-based-Voice-Conversion-WebUI folder, then double click on infer-web.py to open it in Colab's text editor. It should open on the right panel. Then I went to the line specified in the error (for me it was line 87, it seems like it'll be a different line for different people like the OP who had it on line 96) and then replaced FormComponent with IOComponent, i.e.:

class ToolButton(gr.Button, gr.components.FormComponent):

to

class ToolButton(gr.Button, gr.components.IOComponent):

That's all I needed to do to get the UI working like before, at least for inference.

droughtsoftware avatar Jun 16 '23 03:06 droughtsoftware

I fixed this by changing the offending line in infer-web.py to use gr.components.IOComponent instead.

Open the file browser on the left panel, open up the Retrieval-based-Voice-Conversion-WebUI folder, then double click on infer-web.py to open it in Colab's text editor. It should open on the right panel. Then I went to the line specified in the error (for me it was line 87, it seems like it'll be a different line for different people like the OP who had it on line 96) and then replaced FormComponent with IOComponent, i.e.:

class ToolButton(gr.Button, gr.components.FormComponent):

to

class ToolButton(gr.Button, gr.components.IOComponent):

That's all I needed to do to get the UI working like before, at least for inference.

image

edit the cell gradio to gradio==3.34.0

bulieme avatar Jun 16 '23 07:06 bulieme

Edit: The solution right below this comment is simpler and persists across sessions, so use that instead!

I fixed this by changing the offending line in infer-web.py to use gr.components.IOComponent instead.

Open the file browser on the left panel, open up the Retrieval-based-Voice-Conversion-WebUI folder, then double click on infer-web.py to open it in Colab's text editor. It should open on the right panel. Then I went to the line specified in the error (for me it was line 87, it seems like it'll be a different line for different people like the OP who had it on line 96) and then replaced FormComponent with IOComponent, i.e.:

class ToolButton(gr.Button, gr.components.FormComponent):

to

class ToolButton(gr.Button, gr.components.IOComponent):

That's all I needed to do to get the UI working like before, at least for inference.

THank you!!!

HighSteam avatar Jul 02 '23 09:07 HighSteam