Home
Meonako edited this page Mar 13, 2023
·
6 revisions
When your image doesn't contains any generation parameters. It raise an exception none is not allowed as an value
This happened because it return None
as value when your image doesn't contains any generation parameters
- Navigate to
A1111's Web UI root folder
->modules
->api
->api.py
- Go to line: 209 or search for
pnginfoapi
def pnginfoapi(self, req: PNGInfoRequest)
-
Change return value from
return PNGInfoResponse(info=result[1])
to
return PNGInfoResponse(info=result[1] or "Value of your choice here") # I recommended "None" or ""
This change will make Python to choose between this 2 values.
If result[1]
is None
, it'll return "Value of your choice here"
.