Accidentally filed as a resident

Hi, I accidentally filed the 2025 tax return as a resident (federal and California state tax), but I am a non-resident. How do I amend the changes for both federal and state taxes? Any help would be appreciated.