If you changed material slots on every frame, this code should solve your problem.
EDIT: If you started on frame 1 with the material in slot zero you'll need to change the line that sets src_string by changing index to index + 1.
import bpy from pathlib import Path scene = bpy.context.scene path = Path(scene.render.filepath) suffix = ".png" object = bpy.context.active_object for index in range(len(object.material_slots)): src_string = format(index, "04d") + suffix src = path / src_string dst_string = object.material_slots[index].material.name + suffix dst = path / dst_string print(str(src), str(dst)) src.rename(dst) Paste it into the text editor in the Scripting workspace. Make sure you've selected the object that has your geometry nodes as the active object. After you've generated the png files, hit the run button.