I expect you will have a number of things to consider before going ahead with any or all of your humor.
I fell humor adds to the occasion and it should be part of the speech. Most people will be glad of some laughter.
The humor needs to be inoffensive but good.
Think through the funny stories you have. personal ones woud be great.
Consider also jokes, just the right joke can be excellent. A badly delivered joke would be bad.
Make sure it all flows. Cutting in to tell an unrelated joke would be confusing for you and the audience.
Perhaps you could write out the speech with your hunor in it.
Is it really as funny as you think when you read it over?
Take care to consider the audience. There is nothing more likely to be greeted by silence than stories which you ( and a few friends who were there at the time) think are great but unless you were actually there they leave you cold.
If you are uncertain, perhaps someone can help read through you humorous draft.
If you have the material and the delivery great humor will greatly enhance the graduation speech.
If you don't get a laugh keep going, don't repeat the punchline. If it was not funny first time it won't be funny a second.