CoolFace
Modelpublic

peteromallet/Qwen-Image-Edit-InSubject

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
88likes2kdownloads
README.md72 linesDownload Raw Back to root
1---2license: apache-2.03datasets:4- peteromallet/InSubject-Dataset5base_model:6- Qwen/Qwen-Image-Edit7tags:8- image9- editing10- lora11- style-transfer12- qwen13pipeline_tag: image-to-image14library_name: diffusers15---16 17# QwenEdit InSubject LoRA18 19## Model Description20 21**QwenEdit InSubject** is a LoRA fine-tune for QwenEdit that significantly improves its ability to preserve subjects while making edits to images. It works effectively with both single subjects and multiple subjects in the same image. While the base model can perform various image edits, it often loses important subject characteristics or distorts the main subjects during the editing process. This LoRA addresses these limitations to provide more accurate subject-preserving image editing.22 23<video controls>24  <source src="sample.mp4" type="video/mp4">25  Your browser does not support the video tag.26</video>27 28## How to Use29 30To get the best results, use this prompt format:31 32`Make an image of [subject description] in the same scene [new pose/action/details]`33 34You can include "in the same scene" to preserve the original scene and background while modifying the subject's pose, clothing, or other details.35 36For example:37`Make an image of the horned woman in the same scene seated on a low pink ottoman, adjusting the buckle on one of her matching blue heels while her other leg is delicately crossed, wearing a blue and gold dress with a ruffled collar, red lips and freckles, the vibrant pink background still filling the frame behind her.`38 39### use with diffusers40 41```42import torch43from diffusers import QwenImageEditPipeline44 45pipe = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit", torch_dtype=torch.bfloat16)46pipe.to("cuda")47 48pipe.load_lora_weights("peteromallet/Qwen-Image-Edit-InSubject", weight_name="InSubject-0.5.safetensors")49```50 51### Strengths & Weaknesses52 53The model excels at:54- Preserving subject identity and key characteristics during edits55- Maintaining subject proportions and anatomical accuracy56- Making targeted edits without affecting the main subject57- Strong subject-aware prompt adherence58 59The model may struggle with:60- Complex multi-subject scenes where subject boundaries are unclear61- Very dramatic lighting changes that fundamentally alter subject appearance62- Edits that require significant subject pose or orientation changes63 64## Training Data65 66The QwenEdit InSubject LoRA was trained on a curated dataset of high-quality image editing pairs that focus on subject preservation.  You can find this data [here](https://huggingface.co/datasets/peteromallet/InSubject-Dataset).67 68 69## Links70 71- Model: [https://huggingface.co/peteromallet/Qwen-Image-Edit-InSubject](https://huggingface.co/peteromallet/Qwen-Image-Edit-InSubject)72- Dataset: [https://huggingface.co/datasets/peteromallet/high-quality-midjouney-srefs](https://huggingface.co/datasets/peteromallet/high-quality-midjouney-srefs)