The process of formation of pores, cavities and similar defects in welded joints of stainless steels and aluminum alloys, affecting their quality, directly depends on spatial weld position in laser welding. Reducing the angle of inclination from 90° to 0° during downhill and uphill welding of AISI 321 stainless steel in the pulse mode of laser generation leads to an increase in both the number of pores and their size. At the same time, defects in the form of pores are not observed in the continuous mode of laser generation. In laser welding of butt joints of AISI 321 steel, the flat and vertical weld positions are the most promising, as they provide the highest level of quality. In order to provide a stable formation of a high-quality butt joint of aluminum AMg6M alloy and to prevent the failure of laser equipment, the welding process should be carried out in a vertical uphill weld position.