{"slug": "how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact", "title": "How can I replace an object using a reference image while preserving its exact design?", "summary": "A user reports that Qwen-Image-Edit-2511 struggles with one-to-one replacement of multiple identical objects in a scene, often removing all but one instance or misaligning viewpoints despite reference images. The user also seeks to reduce inference time from 6–7 minutes to 30–60 seconds on an NVIDIA A100-SXM4-80GB GPU, noting that torch.compile cuts subsequent runs to ~2 minutes, and asks if such speed is achievable without reducing the 40 inference steps.", "body_md": "Hi, first of all, a huge thanks to you!\n\nQwen gives me very good results with simple and medium-complexity images. However, I noticed one issue when there are multiple instances of the same object in a room.\n\nFor example, if there are four sofas and I ask it to replace the sofas with chairs, its behavior is not very consistent. Sometimes, it removes all the sofas and places only one chair. If I explicitly prompt it to replace all the sofas and place a chair in each of the four positions, the viewpoints/angles of the generated chairs are often not correct, even when I provide 3–4 reference images of the chair.\n\nOverall, the performance seems very good, but this is the main limitation I have noticed so far: when there are multiple instances of the same object in an image, achieving accurate one-to-one replacement while preserving the original position and viewpoint is difficult.\n\nHere is my other issue:\n\nI’m trying to optimize the inference time.\n\n**Current setup:**\n\nGPU: NVIDIA A100-SXM4-80GB\n\nPyTorch: 2.13.0+cu130\n\nCUDA: 13.0\n\nPrecision: BF16\n\nInference steps: 40\n\n`true_cfg_scale`: 4.0\n\n`guidance_scale`: 1.0\n\nProduct-consistency LoRA: `FractalAIResearch/Kalaido-qwenedit-lora` (optional)\n\nVRAM usage: ~54–55 GB\n\nCurrently, a single image takes around **6–7 minutes** without optimization. After using `torch.compile`, the first generation takes around **6–7 minutes**, but subsequent generations take around **2 minutes**.\n\nMy target is to get the inference time down to **seconds (ideally ~30–60 seconds)** while keeping **40 inference steps and similar output quality**.\n\nIs this kind of inference speed achievable with Qwen-Image-Edit-2511 on an A100 80GB? Are there recommended optimizations, faster/quantized variants, or inference techniques that can bring the generation time into the seconds range without reducing the steps?", "url": "https://wpnews.pro/news/how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact", "canonical_source": "https://discuss.huggingface.co/t/how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact-design/179235#post_7", "published_at": "2026-09-07 07:12:21+00:00", "updated_at": "2026-09-07 07:26:23.236771+00:00", "lang": "en", "topics": ["generative-ai", "ai-products"], "entities": ["Qwen-Image-Edit-2511", "NVIDIA A100-SXM4-80GB", "PyTorch", "CUDA", "FractalAIResearch/Kalaido-qwenedit-lora"], "alternates": {"html": "https://wpnews.pro/news/how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact", "markdown": "https://wpnews.pro/news/how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact.md", "text": "https://wpnews.pro/news/how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact.txt", "jsonld": "https://wpnews.pro/news/how-can-i-replace-an-object-using-a-reference-image-while-preserving-its-exact.jsonld"}}