PRITHIVSAKTHIUR/Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load
Über uns
Demonstration for the Qwen-Image-Edit-2511 model with lazy-loaded LoRA adapters for advanced single- and multi-image editing. Supports 7+ specialized LoRAs including photo-to-anime, multi-angle camera control, pose transfer (Any-Pose), upscaling, style transfer, light migration, and manga tone. Features fast inference (4 steps default).
Design und MedienWhat you can do
- Lazy-Loaded Adapter Registry: On-demand downloading and weight-fusing for 19 specialized LoRA adapters (e.g., Multiple-Angles, Photo-to-Anime, Anime-V2, Light-Migration, Upscaler, Style-Transfer, Manga-Tone, Anything2Real, Polaroid-Photo, Unblur-Anything, Pixar-Inspired-3D, Studio-DeLight, and Cinematic-FlatLog).
- Flash Attention 3 (FA3) Acceleration: Hooks natively into the QwenDoubleStreamAttnProcessorFA3 processor layer to accelerate cross-attention inference phases while reducing active GPU memory consumption.
- Text-Guided Image Editing: Offers camera angle rotations, shadow removal, uniform studio relighting, skin detail refinement, scene propagation, and 4K upscaling.
- Studio SPA Interface: An interactive single-page application built with modern vanilla web components—featuring an A/B image comparison slider, history filmstrip, quick prompt chips, and drag-and-drop file support.
Gemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalQwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load
Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load is an experimental, high-performance image editing and style-transfer platform built on top of the Qwen/Qwen-Image-Edit-2511 base model and an optimized transformer architecture (prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V19). The application integrates Flash Attention 3 (QwenDoubleStreamAttnProcessorFA3) to achieve low VRAM footprints and accelerated 4-step image manipulation.
Using a Lazy Loading design for LoRA adapters, the system dynamically downloads and fuses task-specific adapters on demand—including Multiple Angles, Photo-to-Anime, Anime-V2, Light Migration, Upscaler, Style Transfer, Manga Tone, Anything2Real, Polaroid Photo, Unblur Anything, Midnight Noir, Hyper-Realistic Portrait, Ultra-Realistic Portrait, Pixar-Inspired 3D, Noir Comic Book, Any Light, Studio DeLight, and Cinematic FlatLog. Every edit prompt additionally passes through a CPU-only NCII safety guard before any GPU work is queued. The web workspace is served via a custom, single-page web app built with a FastAPI backend server (gradio.Server) and a dark-mode frontend interface featuring a dual-view canvas, A/B comparison slider, history filmstrip, and interactive prompt suggestions.
Key Features
- Lazy-Loaded Adapter Registry: On-demand downloading and weight-fusing for 19 specialized LoRA adapters (e.g., Multiple-Angles, Photo-to-Anime, Anime-V2, Light-Migration, Upscaler, Style-Transfer, Manga-Tone, Anything2Real, Polaroid-Photo, Unblur-Anything, Pixar-Inspired-3D, Studio-DeLight, and Cinematic-FlatLog).
- Flash Attention 3 (FA3) Acceleration: Hooks natively into the
QwenDoubleStreamAttnProcessorFA3processor layer to accelerate cross-attention inference phases while reducing active GPU memory consumption. - Text-Guided Image Editing: Offers camera angle rotations, shadow removal, uniform studio relighting, skin detail refinement, scene propagation, and 4K upscaling.
- Studio SPA Interface: An interactive single-page application built with modern vanilla web components—featuring an A/B image comparison slider, history filmstrip, quick prompt chips, and drag-and-drop file support.
- Smart Aspect Ratio Snapping: Automatically resizes uploaded images to stay within 1024px while snapping width and height to multiples of 8 to prevent shape mismatch errors during inference.
- NCII Safety Guard: Every edit prompt is screened by a 270M CPU-only text classifier in an isolated subprocess. A
/check_safetypre-flight runs before any GPU request is queued, with a defense-in-depth re-check inside the GPU worker.
Repository Structure
├── .gitignore
├── .python-version
├── examples/
│ ├── 1.jpg
│ ├── A.jpeg
│ ├── B.jpg
│ ├── CFL.jpg
│ ├── HRP.jpg
│ ├── HS1.jpg
│ ├── HS2.jpg
│ ├── L1.jpg
│ ├── L2.jpg
│ ├── MN.jpg
│ ├── MT.jpg
│ ├── NCB.jpg
│ ├── P1.jpg
│ ├── P2.jpg
│ ├── PI.jpg
│ ├── PP1.jpg
│ ├── R1.jpg
│ ├── SL.jpg
│ ├── ST1.jpg
│ ├── ST2.jpg
│ ├── U.jpg
│ ├── UA.jpeg
│ ├── URP.jpg
│ ├── Z1.jpg
│ ├── Z2.jpg
│ └── Z3.jpg
├── qwenimage/
│ ├── __init__.py
│ ├── pipeline_qwenimage_edit_plus.py
│ ├── qwen_fa3_processor.py
│ └── transformer_qwenimage.py
├── src/
│ └── qwen_image_edit_2511_loras_fast/
│ └── __init__.py
├── app.py
├── index.html
├── LICENSE
├── ncii_guard.py
├── pre-requirements.txt
├── pyproject.toml
├── README.md
├── requirements.txt
└── uv.lock
Installation and Requirements
To set up the Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load environment locally, configure your system according to the specifications below. A modern CUDA-enabled GPU is required.
- Python Version: Python 3.14 is required (
requires-python = ">=3.14"); the bundled.python-versionpins 3.14. - PyTorch Version:
torch==2.11.0or above is required for better compatibility. - CUDA Version: CUDA 13.0 is recommended (
--extra-index-url https://download.pytorch.org/whl/cu130), matching the environment used on the live Hugging Face demo.
Running with uv (Recommended)
uv is an ultra-fast Python package and project manager written in Rust. It ensures rapid virtual environment setup and exact dependency synchronization based on the uv.lock file.
Step 1 — Install uv
- macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh - Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Step 2 — Clone the repository
git clone https://github.com/PRITHIVSAKTHIUR/Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load.git
cd Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load
Step 3 — Initialize the project and install dependencies
uv sync
Step 4 — Run the script
uv run app.py
Standard PIP Implementation
1. Update Package Manager Upgrade your local package manager:
pip install "pip>=26.2.1"
2. Install Core Dependencies
Install the primary deep learning stack, transformer libraries, and core computing utilities listed in requirements.txt:
pip install -r requirements.txt
Core Requirements List (requirements.txt)
--extra-index-url https://download.pytorch.org/whl/cu130
torch==2.11.0
torchvision==0.26.0
transformers==5.14.1
accelerate==1.14.0
diffusers==0.39.0
peft==0.19.1
gradio==6.30.0
av==17.1.0
spaces>=0.51.3
huggingface-hub==1.24.0
kernels>=0.16.0
Safety Guard
Prompt safety is enforced in two stages so that unsafe requests never consume GPU time:
- Isolated CPU classifier:
ncii_guard.pyhosts thehfmlsoc/ncii-guard-v02text classifier in a plain subprocess. The child interpreter never importsspacesor touches CUDA, which keeps the GPU worker's initialization state intact. The parent talks to it over stdin/stdout using one JSON object per line. - Pre-flight endpoint:
/check_safety(queue=False) evaluates the prompt on CPU and returns{"status": "ok"}or{"status": "blocked", "message": ...}. The frontend calls it before/edit_image, so a blocked prompt never enters the GPU queue. - Defense-in-depth re-check:
edit_imagere-runs the same check inside the GPU worker and returns a blocked payload without running inference. - Threshold: a prompt is blocked when the classifier label is
nciiwith a score of at least0.5. - Fail-open: if the guard subprocess is unavailable, requests proceed normally so the Space stays usable.
Usage
Once the web server initializes, open your browser to the local address output in your terminal (typically http://127.0.0.1:7860/).
- Upload Asset: Drag and drop an image into the main canvas workspace, paste an image from your clipboard, or click the upload icon in the left rail.
- Select Style / LoRA: Choose your target editing task from the Style / LoRA dropdown menu in the right inspector panel. The adapter weights will download lazily on first use.
- Refine Instructions: Type your instructions inside the prompt field, or click one of the Quick Prompts chips to instantly fill it. Press ⌘/Ctrl + Enter or click Edit Image. The prompt is screened on CPU by the safety guard before the GPU job is queued.
- Compare & Chain: Use the Compare tool on the left rail to view an A/B slider of the before and after states. Click Use as Input to chain multiple edits sequentially.
Links and Source
- GitHub Repository: https://github.com/PRITHIVSAKTHIUR/Qwen-Image-Edit-2511-LoRAs-Fast-Lazy-Load.git
- Hugging Face Live Space: https://huggingface.co/spaces/prithivMLmods/Qwen-Image-Edit-2511-LoRAs-Fast
- License: Apache License 2.0
- Thanks to AK (aka akhaliq) for the initial PR #27, customization, and motivation.
Ähnliche Projekte entdecken
Wird geladen…