Question: How come Hermione didn't say something comforting to Hagrid as they we're leaving before the execution like Harry did? It seems a bit out of character for her.
Answer: It's not about Hermione. This has to do with filmmaking. The scene was constructed to maintain the pacing, timing, and the mood, which quickly changes when the execution party suddenly arrives at the hut and the Trio rushes out. Harry expressed what all three were thinking. Having each character say something to Hagrid, would just slow the action with unnecessary dialogue. There may have been more to the scene when it was originally filmed, but editing often deletes excess details, for the reasons stated above. Movies, in particular, have details eliminated during post-production editing.
Answer: Hagrid wants them to leave quickly, before the executioner and the Minister of Magic arrive. Also, Hermione may not have known what to say. One of Hagrid's beloved pets is about to be executed - what could anyone say to make him feel better about it?