Run this model with HF Jobs
Run peteromallet/Flux-Kontext-InScene on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/peteromallet/Flux-Kontext-InScene. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/peteromallet/Flux-Kontext-InScene on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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
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]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
- Downloads last month
- 211
Model tree for peteromallet/Flux-Kontext-InScene
Base model
black-forest-labs/FLUX.1-Kontext-dev