Downloads · 30 days
0
DiffSynth-Studio/FLUX.1-Kontext-dev-lora-SuperOutpainting
FLUX.1-Kontext-dev-lora-SuperOutpainting is a machine learning model from DiffSynth-Studio. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This LoRA model is trained based on the Kontext model and DiffSynth-Studio. After loading this model, you can input the instruction Outpaint the image. to perform image outpainting.
Downloads · 30 days
0
Access
Public
Updated Sep 28, 2025
Parameters
153M
317 MB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors306 MB · 95%
From the Hugging Face model README
This LoRA model is trained based on the Kontext model and DiffSynth-Studio. After loading this model, you can input the instruction Outpaint the image. to perform image outpainting.
| Example 1 | Example 2 | Example 3 | |
|---|---|---|---|
| Prompt | Outpaint the image. | Outpaint the image. | Outpaint the image. |
| Input | ![]() | ![]() | ![]() |
| Outpainted Image | ![]() | ![]() | ![]() |
| Example 4 | Example 5 | Example 6 | |
|---|---|---|---|
| Prompt | Outpaint the image. A chicken-headed man in suspenders is playing basketball. | Outpaint the image. A man in suspenders is playing basketball. | Outpaint the image. A chicken-headed man in suspenders is playing basketball with a white background. |
| Input | ![]() | ![]() | ![]() |
| Outpainted Image | ![]() | ![]() | ![]() |
This model is built upon the DiffSynth-Studio framework. Please install it first:
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
pip install -e .
import torch
from diffsynth.pipelines.flux_image_new import FluxImagePipeline, ModelConfig
from PIL import Image
from modelscope import snapshot_download
```python
snapshot_download("DiffSynth-Studio/FLUX.1-Kontext-dev-lora-SuperOutpainting", cache_dir="./models")
pipe = FluxImagePipeline.from_pretrained(
torch_dtype=torch.bfloat16,
device="cuda",
model_configs=[
ModelConfig(model_id="black-forest-labs/FLUX.1-Kontext-dev", origin_file_pattern="flux1-kontext-dev.safetensors"),
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="text_encoder/model.safetensors"),
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="text_encoder_2/"),
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="ae.safetensors"),
],
)
pipe.load_lora(pipe.dit, "models/DiffSynth-Studio/FLUX.1-Kontext-dev-lora-SuperOutpainting/model.safetensors", alpha=1)
image = Image.open("your_image.jpg")
image = pipe(
prompt="Outpaint the image.",
kontext_images=image,
embedded_guidance=2.5,
seed=0,
)
image.save("output.jpg")