rohitgandikota/sliders

Concept Sliders for Precise Control of Diffusion Models

What it solves

Concept Sliders provide a way to precisely control specific attributes of images generated by diffusion models (like Stable Diffusion and FLUX), allowing users to adjust concepts like age, eye size, or mood without affecting other parts of the image.

How it works

The project uses LoRA (Low-Rank Adaptation) adaptors to create "sliders" for specific concepts. These sliders can be trained in two ways:

  • Textual Concept Sliders: Trained using text prompts (e.g., comparing "old person" vs "young person") to isolate a specific attribute.
  • Visual Concept Sliders: Trained using a small set of image pairs (before/after edits) to teach the model the desired visual change.

These sliders can then be applied during inference to increase or decrease the intensity of a concept, and can even be used with null inversion to edit real images.

Who it’s for

AI artists, researchers, and developers working with diffusion models who need more granular, prompt-based control over image generation and editing.

Highlights

  • Multi-Model Support: Works with SD-1.x, SD-2.x, SD-XL, and experimental support for FLUX-1.
  • Flexible Training: Supports both text-driven and image-driven slider creation.
  • Real Image Editing: Ability to edit real‑world photos using null inversion.
  • GPT-4 Integration: Users can use LLMs to help generate the prompts needed to train text sliders.