The Flash: Carlos Valdes and Tom Cavanagh are leaving the series