# What does this PR do?

When using the `trust_remote_code=True` feature with local models (for instance using a clone of a repo with custom code) the custom code files are not copied over if the user does `save_pretrained` (as a result of #22814)  but they should in this specific case. This PR fixes that.

Fixes #24737 
Copy code when using local trust remote code. # What does this PR do?

When using the `trust_remote_code=True` feature with local models (for instance using a clone of a repo with custom code) the custom code files are not copied over if the user does `save_pretrained` (as a result of #22814)  but they should in this specific case. This PR fixes that.

Fixes #24737 
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import requires_backends


LAYOUTLM_V2_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LayoutLMv2Model:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["detectron2"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["detectron2"])

# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import requires_backends


LAYOUTLM_V2_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LayoutLMv2Model:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["detectron2"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["detectron2"])
