Diaz opened up a stubborn Venezia side when he forced home Hernandez's volleyed cross in the 67th minute after a match in which the Rossoneri had been restricted to a handful of chances.
Hernandez then sealed the three points with eight minutes remaining when he collected the ball following a superb play from fellow substitute Alexis Saelemaekers and lashed in his first goal of the campaign.
Milan are a point ahead of Napoli who travel to Sampdoria on Thursday looking to maintain their 100 percent record, while Atalanta and Roma lurk behind in fourth and fifth respectively.
Way back in 13th are Juventus, the 36-time Italian champions eight points behind their Milan rivals following a hard-fought win at Spezia which at one point looked likely to be an embarrassing defeat.
Emmanuel Gyasi and Janis Antiste put Spezia ahead shortly after the break with two deflected strikes following Moise Kean's 28th-minute opener, the Italian's first goal for Juventus since returning from Everton.
However, substitute Federico Chiesa levelled midway through the second half with his first league goal of the season and in the 72nd minute Matthijs de Ligt struck the winner when the ball fell kindly to him from a Paulo Dybala corner.
It was a far from the convincing performance though and Spezia could have levelled late on, with Wojciech Szczesny at his best to push away Giulio Maggiore's volley with five minutes remaining.
"It was a difficult match, in the first half we played well but they managed to fight back," said De Ligt, who has fallen down the pecking order and was only playing because Giorgio Chiellini wasn't fit.
"We're in a period where everything that can go wrong does. Both of their goals came from deflections, let's hope we can have some luck in the future."
They have now conceded at least one goal in 19 consecutive league matches, a trend that needs to change with Chelsea visiting Turin in a week's time.
Salernitana earned their first point of the season when they came back from two goals down to draw 2-2 at home with 15th-placed Verona.
Nikola Kalinic put the away side ahead with a deft first-half brace but Cedric Gondo pulled one back just before half-time when the ball dropped to him following Franck Ribery's free-kick.
Mamadou Coulibaly then struck the leveller with 14 minutes left to send a passionate home crowd wild, although the promoted outfit stay bottom of the league.
Promoted Empoli are 11th after getting their second win of the season 2-0 at Cagliari thanks to goals in either half from Federico Di Francesco and Leo Stulac.