You can disable comments for existing posts using Bulk Edit, but this is not possible for existing media files. You can do both with a single SQL command :
UPDATE wp_your_table_with_posts SET comment_status = 'closed';
You can disable comments for all new posts either by hand as administrator unchecking Settings / Discussion / Allow people to submit comments on new posts, or using SQL command:
UPDATE wp_your_table_with_options SET option_value = NULL WHERE option_name = 'default_comment_status';