This code block will not be executed 
### System Info

python 3.9

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

[](urlhttps://github.com/huggingface/transformers/blob/main/src/transformers/models/detr/modeling_detr.py)

`        combined_attention_mask = None

        if attention_mask is not None and combined_attention_mask is not None:
            # [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
            combined_attention_mask = combined_attention_mask + _expand_mask(
                attention_mask, inputs_embeds.dtype, tgt_len=input_shape[-1]
            )`

### Expected behavior

The combined_attention_mask is set to None, so the if code block below it will never be executed because it  will check combined_attention_mask is not None.
Where is that code block from?<|||||>The code block is from https://github.com/huggingface/transformers/blob/8e8384663d716d4b5a4f510070ff954fc0ba4a52/src/transformers/models/detr/modeling_detr.py#L1076<|||||>cc @NielsRogge <|||||>Hi @AlfredQin, thanks for spotting that. The `combined_attention_mask` was probably taken from another model, which is not relevant for DETR.

Feel free to open a PR to remove that code block!<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.