Each image must first undergo segmentation. Afterwards, you can modify the mask ID and the prompt for image editing, then proceed with the editing process. The link of D-edit paper: https://arxiv.org/abs/2403.04880v2, https://huggingface.co/papers/2403.04880
Edit Mask (Do not change it during the editing process)
Optimization settings
Keep this at 1 for T4 and other 16 GB GPUs.
Editing setting