stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Python 3.8 compatibility for api/models.py

Open BlinkDL opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

api/models.py will produce error under python 3.8 because of list[str]

Steps to reproduce the problem

run webui with --api under python 3.8

What should have happened?

Change all "list[str]" to "List[str]" and add "from typing import List" in the beginning.

Then it works perfectly for python 3.8

Commit where the problem happens

d98eacea40c7a40227f36dbea9cf92f90489310b

What platforms do you use to access UI ?

No response

What browsers do you use to access the UI ?

No response

Command Line Arguments

--api

Additional information, context and logs

No response

BlinkDL avatar Nov 03 '22 08:11 BlinkDL

i can confirm. Moving to 3.10.6 fix the issue for me

ethanfel avatar Nov 03 '22 11:11 ethanfel