DiffSynth-Studio/FLUX.1-Kontext-dev-lora-blingbling

🤗 Hugging Face sourceapache-2.0153M params306 MBsafetensors✓ 13 checksumsupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo DiffSynth-Studio/FLUX.1-Kontext-dev-lora-blingbling ./model-folder
Needs a seeder →

Glass Sculpture - Kontext Image Editing LoRA

Model Introduction

This LoRA model is trained based on the Kontext model and DiffSynth-Studio. After using this model, you can input the instruction Transform into a glass sculpture. to transform the main subject in an image into a sparkling glass sculpture.

Model Results

Example 1 Example 2 Example 3
Original
Generated
Example 4 Example 5 Example 6
Original
Generated

Usage Instructions

This model is trained using 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

snapshot_download("DiffSynth-Studio/FLUX.1-Kontext-dev-lora-blingbling", 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-blingbling/model.safetensors", alpha=1)

image = Image.open("your_image.jpg")
image = pipe(
    prompt="Transform into a glass sculpture.",
    kontext_images=image,
    embedded_guidance=2.5,
    seed=0,
)
image.save("output.jpg")