Skip to content

ototadana/imgflw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imgflw

A demo application for image editing using LLM.

demo

imgflw Application Processing Flow

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
Loading

Installation and Launch

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

Initial Setup

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".

OpenAI API Key

Editing Images

  1. Upload the image you want to edit. Upload

  2. Describe how you want to edit the image in "Input your request here:" and click "Edit". Edit

License

This software is released under the MIT License, see LICENSE.

Acknowledgements

This application has been developed with the support of several outstanding software resources:

Workflow Definition Generation

Workflow Definition Storage

Image Processing

User Interface

Releases

No releases published

Packages

No packages published

Languages