An embedding is similar to a lookup table, where you provide indices as the input and get dense tensors (defined via embedding_dim) as the output.
Could you explain a bit, how your embedding sizes differ?
The input shape is flexible as seen here:

nb_words = 10
emb_dim = 100

emb = nn.Embedding(nb_words, emb_dim)

x = torch.randint(0, nb_words, (10,))
output = emb(x)
print(output.shape)
> torch.Size([10, 100])

x = torch.randint(0, nb_words, (10, 2))
output = emb(x)
print(output.shape)
> torch.Size([10, 2, 100])

x = torch.randint(0, nb_words, (10, 2, 3))
output = emb(x)
print(output.shape)
> torch.Size([10, 2, 3, 100])

Do you want to add new (unknown) word indices to the embedding matrix?