ToTheBeginning / PuLID

[NeurIPS 2024] Official code for PuLID: Pure and Lightning ID Customization via Contrastive Alignment
Apache License 2.0
2.72k stars 189 forks source link

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. #114

Open lmc710731910 opened 1 month ago

lmc710731910 commented 1 month ago

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() 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.

For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type

部署完工程后,generate生成报错,用的fp8模型, 启动参数:python app_flux.py --fp8 --offload

fahadshery commented 1 month ago

I had the same issue. I upgraded the pydantic module using pip install pydantic --upgrade then restarted the pulid and it fixed it.

My GPU's compute capability is 6.1 and that's where it's failing now because it's looking for compute power 8 or above. Got to fix it

joshua-ne commented 1 month ago

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() 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.

For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type

部署完工程后,generate生成报错,用的fp8模型, 启动参数:python app_flux.py --fp8 --offload

你好,这个问题解决了吗?pydantic已经是最新版本了

L1n111ya commented 3 weeks ago

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() 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. For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type 部署完工程后,generate生成报错,用的fp8模型, 启动参数:python app_flux.py --fp8 --offload

你好,这个问题解决了吗?pydantic已经是最新版本了

你好,我在我自己的项目上解决了这个问题,我的项目使用了 gradio,是 gradio 的版本不会导致的这个报错,他会在这个报错之前告诉你如何解决,查看前面的报错,把前面的报错解决即可

sausax commented 1 day ago

It is a gradio/pydantic compatibility issue. This fixes it: https://github.com/gradio-app/gradio/issues/9278#issuecomment-2333395667