DDIM Redux: Mathematical Foundation and Some Extension