# How can I replace an object using a reference image while preserving its exact design?

> 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: 2026-09-07 07:12:21+00:00

Hi, first of all, a huge thanks to you!

Qwen 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.

For 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.

Overall, 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.

Here is my other issue:

I’m trying to optimize the inference time.

**Current setup:**

GPU: NVIDIA A100-SXM4-80GB

PyTorch: 2.13.0+cu130

CUDA: 13.0

Precision: BF16

Inference steps: 40

`true_cfg_scale`: 4.0

`guidance_scale`: 1.0

Product-consistency LoRA: `FractalAIResearch/Kalaido-qwenedit-lora` (optional)

VRAM usage: ~54–55 GB

Currently, 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**.

My target is to get the inference time down to **seconds (ideally ~30–60 seconds)** while keeping **40 inference steps and similar output quality**.

Is 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?
