I saw a picture of you, on the Internet, in which you were smoking a cigar.

I don't think the commas are necessary because there is little chance of confusion. What do you think?
I don't believe they are necessary and I don't believe they are wrong. The point is more rather you consider where you saw the picture (On the Internet, in his father's home, in the school yearbook) is important or not. If it's not, then leave them out.

No one will think that the "in which" refers back to the Internet. It clearly refers to the picture.
The commas here would not only be unnecessary, they would be incorrect. The phrase "on the internet" is a simple prepositional phrase and as such should not be set off from the sentence. To avoid confusion, however, the phrase should be placed as close as possible to the word in connects with. In this sentence "on the internet" is where someone saw a photo of you, so the sentence might be more effectively written as, "On the internet I saw a picture of you..." or "I saw a picture on the internet of you..."