lrzjason / T2ITrainer

Practice Code for text to image trainer
GNU Affero General Public License v3.0
82 stars 5 forks source link

启动kolors lora训练用的ui.py后,点击任何按钮均提示错误 #16

Closed jinxishe closed 1 week ago

jinxishe commented 1 week ago

按文档提示安装,安装过程无问题, 启动ui.py后,点击任何按钮均有以下错误提示:

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "F:\T2ITrainer\venv\Lib\site-packages\pydantic\type_adapter.py", line 270, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\T2ITrainer\venv\Lib\site-packages\pydantic\type_adapter.py", line 112, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'starlette.requests.Request'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.
jinxishe commented 1 week ago

这似乎是个gradio的issue,将gradio的依赖版本设置到4.43就没这个问题了。

lrzjason commented 1 week ago

收到,我更新一下gradio的依赖