r each component/model a folder is created inside the local path that is named after the given attribute name, e.g. ./stable_diffusion/unet.
In addition, a model_index.json file is created at the root of the local path, e.g. ./stable_diffusion/model_index.json so that the complete pipeline can again be instantiated
from the local path.
to which accepts a string or torch.device to move all models that are of type torch.nn.Module to the passed de