Instructions to use peteromallet/Flux-Kontext-InScene with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use peteromallet/Flux-Kontext-InScene with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("peteromallet/Flux-Kontext-InScene") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
| license: apache-2.0 | |
| datasets: | |
| - peteromallet/InScene-Dataset | |
| base_model: | |
| - black-forest-labs/FLUX.1-Kontext-dev | |
| tags: | |
| - image | |
| - editing | |
| - lora | |
| - diffusers | |
| pipeline_tag: image-to-image | |
| # InScene: Flux.1-Kontext.dev LoRA | |
| ## Model Description | |
| **InScene** is a LoRA for Flux.Kontext.dev that's designed to generate images that maintain scene consistency with a source image. It is trained on top of Flux.1-Kontext.dev. | |
| The primary use case is to generate variations of a shot while keeping the background and overall environment, characters, and styles the same: | |
|  | |
| ## How to Use | |
| To get the best results, start your prompt with the phrase: | |
| `Make a shot in the same scene of ` | |
| And describe your new image. | |
| For example: | |
| `Make a shot in the same scene of the car up very close to the camera with the driver smiling manically.` | |
| ### Strengths & Weaknesses | |
| The model excels at: | |
| - Generating realistic shots that are consistent with the original scene. | |
| - Handling most common photographic and artistic styles. | |
| The model may struggle with: | |
| - Action-oriented prompts (e.g., "punching", "running"). | |
| - Uncommon or highly abstract styles. | |
| ## Training Data | |
| The `InScene` LoRA was trained on 394 image pairs. This dataset was created by extracting and enriching frames from the WebVid dataset. | |
| You can find the public dataset used for training here: | |
| [https://huggingface.co/datasets/peteromallet/InScene-Dataset](https://huggingface.co/datasets/peteromallet/InScene-Dataset) |