Skip to content
Meonako edited this page Mar 13, 2023 · 6 revisions

Welcome to the webui-api wiki!

Table of Contents

PNG info API fix [They fixed it. But I'll leave this here in case anyone want to know]

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

  1. Navigate to A1111's Web UI root folder -> modules -> api -> api.py
  2. Go to line: 209 or search for pnginfoapi
def pnginfoapi(self, req: PNGInfoRequest)
  1. 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".