The input of the inverter is usually DC, or the DC obtained by the rectifier filter of the mains. These DC include DC power grid, battery, photovoltaic cell and other ways to get DC.
Usually these electric energy can not be directly used as the input voltage of the inverter, but through a certain filter circuit and EMC circuit after the input of the inverter.