A demo application for image editing using LLM.
sequenceDiagram
participant User
participant imgflw as User Interface
participant OpenAI_Embed as OpenAI<br/>Embedding API
participant Chroma as Chroma<br/>Vector Store
participant OpenAI_TextGen as OpenAI<br/>Text Generation API
participant FaceEditor as Image Processing<br/>Components
User->>imgflw: 1. Input request
imgflw->>OpenAI_Embed: 2. Convert request to embedding
OpenAI_Embed->>imgflw:
imgflw->>Chroma: 3. Search in Chroma
alt Similar request exists in Chroma
Chroma-->>imgflw: 4a. Retrieve corresponding workflow definition (JSON)
else No similar request in Chroma
imgflw->>OpenAI_TextGen: 4b. Generate new workflow definition (JSON)
end
imgflw->>FaceEditor: 5. Process image using workflow definition
Clone this repository:
git clone https://github.com/ototadana/imgflw
cd imgflw
Install PyTorch 2.1 and xFormers:
Example command:
pip install torch torchvision xformers --index-url https://download.pytorch.org/whl/cu121
Install required software:
pip install -r requirements.txt
To launch the application:
python main.py
Once the interface appears in the browser, switch to the "Settings" tab. Enter your API key in "Workflow Generator - OpenAI API Key" and click "Save".
This software is released under the MIT License, see LICENSE.
This application has been developed with the support of several outstanding software resources: