An enhanced AI compositing workflow built on Qwen Image Edit 2509 with Fusion LoRA. Unlike the default setup on the QWEN Fusion LoRA page — which often alters color balance, positioning, and fine details — this workflow preserves the original plate perfectly, modifying only the masked regions you define. Simply import your background and subject, remove the background, composite and mask areas (including shadows), then provide a natural-language prompt describing your desired final look. Credits to the Qwen model and LoRA creators.
Video Demo - https://youtu.be/np99SCBUNo4
This repository contains a ComfyUI workflow for realistic subject integration using Qwen Image Edit 2509 with Fusion LoRA.
It’s designed to automate the process of compositing a subject over a background — intelligently matching lighting, color grading, and shadows for a seamless final result.
Traditional compositing requires manual relighting, color correction, and shadow work to unify the subject and background.
This workflow leverages diffusion-based AI harmonization to handle those tasks automatically while keeping full artistic control over layout and intent.
The process involves:
- Importing and resizing the background and subject.
- Removing the subject’s background using AI segmentation.
- Positioning and scaling the subject over the background.
- Masking areas for compositing and shadow interaction.
- Adding a natural language prompt describing the final look.
- Letting Qwen Image Edit + Fusion LoRA infer lighting, grading, and shadow adjustments.
- Comparing and saving the final photorealistic composite.
- ComfyUI
- Models:
qwen_image_edit_2509_fp8_efdm3m.safetensorsQwen-Fusion-LoRAQwen-Image-Lightning LoRAs (V1.0 / V1.1)qwen_2_5_v1_7b_fp8_scaled.safetensors(CLIP)qwen_image_vae.safetensors(VAE)
Place models in: ComfyUI/models/checkpoints/ ComfyUI/models/loras/ ComfyUI/models/vae/ ComfyUI/models/clip/
| Step | Description |
|---|---|
| 1. | Import and resize background image |
| 2. | Import subject and remove its background |
| 3. | Composite subject over background |
| 4. | Mask subject and shadow regions |
| 5. | Apply prompt and run diffusion harmonization |
| 6. | Compare AI composite with base comp |
| 7. | Save final image to disk |
A cinematic photo of a spacecraft on a Martian desert beside an astronaut, realistic lighting, soft shadows, 50mm lens.
No need to specify color correction or light direction — the model automatically adapts these elements.
The workflow combines:
- Qwen Image Edit 2509 for diffusion-based inpainting and relighting.
- Fusion LoRA for blending subject and background colors naturally.
- Lightning LoRAs for fast, detailed refinement.
- CLIP + VAE for high-fidelity text/image understanding and decoding.
Together, they turn ComfyUI into a context-aware compositing environment — fusing manual control with AI intuition.
| Rough Composite | AI Composite |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Qwen Image Edit 2509 by the original authors
- Fusion LoRA and Lightning LoRAs by their respective creators
- Workflow design and optimization by [Your Name]
All rights and model ownership belong to their respective authors.
This project is released under the MIT License.
You are free to modify and adapt it with proper credit to the model and LoRA creators.
If you use or modify this workflow, feel free to share results or improvements — pull requests and suggestions are welcome!
"Human intent meets AI precision — compositing made effortless."









