Downloads · 30 days
1.1K
7% of all-time downloads
flymy-ai/qwen-image-edit-inscene-lora
qwen-image-edit-inscene-lora is a image-to-image model from flymy-ai. Use it when you need one image transformed into another. It is set up for diffusers. The card lists the license as apache-2.0.
An open-source LoRA (Low-Rank Adaptation) model for Qwen-Image-Edit that specializes in in-scene image editing by FlyMy.AI.
Downloads · 30 days
1.1K
7% of all-time downloads
All-time downloads
15.3K
Public
Repo size
47.2 MB
Likes
93
Public
Click a slice to open those files.
.safetensors47.2 MB · 100%
From the Hugging Face model README
An open-source LoRA (Low-Rank Adaptation) model for Qwen-Image-Edit that specializes in in-scene image editing by FlyMy.AI.
Agentic Infra for GenAI. FlyMy.AI is a B2B infrastructure for building and running GenAI Media agents.
🔗 Useful Links:
diffusersInstall required packages:
pip install torch torchvision diffusers transformers accelerate
Install the latest diffusers from GitHub:
pip install git+https://github.com/huggingface/diffusers
from diffusers import QwenImageEditPipeline
import torch
from PIL import Image
# Load the pipeline
pipeline = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit")
pipeline.to(torch.bfloat16)
pipeline.to("cuda")
# Load trained LoRA weights for in-scene editing
pipeline.load_lora_weights("flymy-ai/qwen-image-edit-inscene-lora",weight_name="flymy_qwen_image_edit_inscene_lora.safetensors")
# Load input image
image = Image.open("./assets/qie2_input.jpg").convert("RGB")
# Define in-scene editing prompt
prompt = "Make a shot in the same scene of the left hand securing the edge of the cutting board while the right hand tilts it, causing the chopped tomatoes to slide off into the pan, camera angle shifts slightly to the left to center more on the pan."
# Generate edited image with enhanced scene understanding
inputs = {
"image": image,
"prompt": prompt,
"generator": torch.manual_seed(0),
"true_cfg_scale": 4.0,
"negative_prompt": " ",
"num_inference_steps": 50,
}
with torch.inference_mode():
output = pipeline(**inputs)
output_image = output.images[0]
output_image.save("edited_image.png")
Input Image:

Prompt: "Make a shot in the same scene of the left hand securing the edge of the cutting board while the right hand tilts it, causing the chopped tomatoes to slide off into the pan, camera angle shifts slightly to the left to center more on the pan."
Output without LoRA:

Output with Inscene LoRA:

This LoRA model is specifically trained to enhance Qwen-Image-Edit's ability to perform in-scene image editing. It focuses on:
This LoRA model was trained using the FlyMy.AI LoRA Trainer with:
If you have questions or suggestions, join our community:
⭐ Don't forget to star the repository if you like it!
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.