AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.84k stars 26.64k forks source link

[Feature Request]: API list files #9197

Open bakman2 opened 1 year ago

bakman2 commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

Proposed workflow

Add endpoints to the API.

For listing files, perhaps this should include controlled paging. End result - produce an array of objects;

[
{
  path:'<full path>/txt2img',
  files: ['filename'...]
},
{
  path:'<full path>/img2img',
  files: ['filename'...]
}
...

Additional information

No response

missionfloyd commented 1 year ago

There's already a pnginfo endpoint.

It an also be read with PIL like so.

from PIL import Image

img= Image.open(imagefile)
param = img.info["parameters"]
bakman2 commented 1 year ago

Ah I overlooked that part thanks. I will modify the request.