Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in convert model #46

Open
nova-synova opened this issue Jul 28, 2023 · 2 comments
Open

error in convert model #46

nova-synova opened this issue Jul 28, 2023 · 2 comments

Comments

@nova-synova
Copy link

when i follow the guide of Model-import, then run "python .\stable_diffusion.py --optimize --model_id runwayml/stable-diffusion-v1-5" in "olive-sd\olive\examples\directml\stable_diffusion" directory, report error as follow:

(olive-env) PS D:\E_2_D\temp\axodox\olive-sd\olive\examples\directml\stable_diffusion> python .\stable_diffusion.py --optimize --model_id runwayml/stable-diffusion-v1-5
C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\pydantic_internal_config.py:269: UserWarning: Valid config keys have changed in V2:

  • 'json_dumps' has been removed
  • 'json_loads' has been removed
    warnings.warn(message, UserWarning)
    C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\pydantic_internal_config.py:269: UserWarning: Valid config keys have changed in V2:
  • 'json_dumps' has been removed
  • 'json_loads' has been removed
    warnings.warn(message, UserWarning)
    C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\pydantic_internal_config.py:269: UserWarning: Valid config keys have changed in V2:
  • 'json_dumps' has been removed
  • 'json_loads' has been removed
    warnings.warn(message, UserWarning)
    Traceback (most recent call last):
    File ".\stable_diffusion.py", line 18, in
    from olive.workflows import run as olive_run
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\olive\workflows_init_.py", line 5, in
    from olive.workflows.run.run import run
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\olive\workflows\run\run.py", line 16, in
    from olive.passes import Pass
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\olive\passes_init_.py", line 5, in
    from olive.passes.olive_pass import FullPassConfig, Pass
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\olive\passes\olive_pass.py", line 13, in
    from olive.common.config_utils import ConfigBase, validate_config
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\olive\common\config_utils.py", line 118, in
    class ConfigListBase(ConfigBase):
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\pydantic_internal_model_construction.py", line 98, in new
    private_attributes = inspect_namespace(
    File "C:\Users\synov\miniconda3\envs\olive-env\lib\site-packages\pydantic_internal_model_construction.py", line 291, in inspect_namespace
    raise TypeError("To define root models, use pydantic.RootModel rather than a field called 'root'")
    TypeError: To define root models, use pydantic.RootModel rather than a field called 'root'
    (olive-env) PS D:\E_2_D\temp\axodox\olive-sd\olive\examples\directml\stable_diffusion>
@hpolkowski
Copy link

hpolkowski commented Jul 31, 2023

Hi, pydantic V2 changed a lot. You can uninstall it pip uninstall pydantic and install V1 pip install pydantic==1.10.12.

@nova-synova
Copy link
Author

thanks, it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants