webaverse-studios / pixel-art-diffusion-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pixel-art-diffusion-api

How to run

  • Install conda
  • Run conda env create -f environment.yml (windows_environment.yml if on windows)
  • python server.py

Scripts examplenation

  • disco_xform_utils.py: is generated by the api.py
  • main.py: test script to run the api
  • pixel_art_diffusion.py: runs the generation/installation functions
  • server.py: is the main server/api handler, it is using fastapi and uvicorn
  • routes:
  • /prompt_tags -> returns the available tags for the prompts (#bg, #pixelart etc)
  • /generate (s: str (prompt), steps: int, seed: int) -> adds the generation task in the queue, returns the task id (data.id)
  • /generate_result (query_id: str) -> returns the current state of task, if it is still running or the result has been taken, then it returns the status (running/finished), otherwise it returns the blob/byte array of the generated file

About


Languages

Language:Python 100.0%