Skip to content

PRITHIVSAKTHIUR/Kontext-Photo-Mate-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kontext-Photo-Mate-v2

Kontext-Photo-Mate-v2 is an advanced image manipulation application built on top of the FLUX.1 Kontext AI model, featuring multiple LoRA adapters for fine-grained perspective and object editing. This tool allows users to upload an image, provide textual prompts for creative or corrective edits, and optionally upscale the result for enhanced detail, all via a Gradio web interface with a custom orange-red theme.

C6ONX-_Yyr4Ot0QEkDmCP VjaP0Oy7dV35SgAV4026Q

Features

  • Image editing driven by powerful FLUX.1 Kontext adapters targeting different views: top-down, bottom-up, left/right camera angles, and object removal.
  • Fine control over editing with advanced settings including random or fixed seeds, guidance scales, and inference steps.
  • Optional 4x upscaling using AuraSR.
  • Interactive before/after image slider for comparing edits.
  • Reuse generated images for iterative editing.
  • Smooth UI experience with Gradio and a visually appealing orange-red theme.

Getting Started

Installation

To run Kontext-Photo-Mate-v2 locally, install required dependencies using:

pip install -r requirements.txt

requirements.txt includes:

Repository

Clone the repository:

git clone https://github.com/PRITHIVSAKTHIUR/Kontext-Photo-Mate-v2.git
cd Kontext-Photo-Mate-v2

Usage

Run the Gradio interface script (e.g., python app.py) to launch the web UI.

Interface Overview

  • Upload Image: Upload an image to be edited.
  • Edit Prompt: Enter natural language instructions for modification, e.g., "Remove glasses", or detailed perspective changes.
  • LoRA Adapter: Select the adapter that targets specific contextual transformations:
    • Kontext-Top-Down-View
    • Kontext-Bottom-Up-View
    • Kontext-CAM-Left-View
    • Kontext-CAM-Right-View
    • Kontext-Remover
  • Advanced Settings: Adjust seed, randomization, guidance scale, and steps for inference stability and creativity.
  • Upscale Option: Enable to enhance the resulting image by 4x using AuraSR.
  • Before/After Slider: Compare original and edited images interactively.
  • Reuse Button: Use the generated image as a new input for iterative edits.

Examples

Example prompts demonstrate various use cases such as scene recreation from different perspectives and object removal:

  • "Recreate the scene from a top-down perspective. Maintain all visual proportions, lighting consistency, and realistic spatial relationships."
  • "Remove the apples under the kitten's body."
  • "Render the image from the left-side perspective, keeping consistent lighting, textures, and proportions."

Model Details

  • The system uses the FLUX.1 Kontext pipeline with multiple LoRA weights loaded to enable diverse editing perspectives.
  • Employs AuraSR for upscaling.
  • Device setup supports CUDA GPUs if available.

Developer Notes

  • The core inference performs conditional image editing with text prompt guidance and LoRA adapter selection.
  • Advanced Gradio callbacks enable synchronized UI controls between input/output and buttons.
  • Custom theme "OrangeRedTheme" defines styling consistent with an orange-red palette enhancing visual appeal.

About

Kontext-Photo-Mate-v2 is an advanced image manipulation application built on top of the FLUX.1 Kontext AI model, featuring multiple LoRA adapters for fine-grained perspective and object editing.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages