Is there a way to output materials and lines separately in one render?

To output materials and lines separately as images in one render, enable [Output to Render Elements Only] in the PencilLine node, add Render Elements nodes and render the scene.