Hello team, question: is correct to feed disconnect or VFD, with different wire size in the line and the load side, let's say for ex.#6awg in line side and #10awg in the load side?
any nec violation?
That’s done all the time, there are many code rules that can apply. Perhaps the 6 AWG was run for voltage drop, or a smaller load was installed. Need more specifics for a better answer, such as what is the OCPD for the 6 AWG, does the disconnect have OCPD, ??
It's done all of the time. You mentioned a VFD, it's also possible that the VFD input current is higher than the current the motor so the supply conductors to the drive may be larger than those to the motor.
the #6awg is about 20' from the panelboard that have 50A breaker ahead and go to VFD 40A 3P, 480V and then from the load side of VFD they ran #10awg to a motor
The VFD supply conductors are required to have an ampacity of at least 125% of the VFD rated input current. The motor conductors are required to have an ampacity of at least 125% of the motor full load current as found in the Article 430 tables.
Note that the VFD will also have a requirement for the maximum size OCPD for the line side.
the #6awg is about 20' from the panelboard that have 50A breaker ahead and go to VFD 40A 3P, 480V and then from the load side of VFD they ran #10awg to a motor
There is no rule of thumb for these kind of things. As others mentioned, there are rules for sizing the wire feeding the VFD and rules for sizing the wire going to the motor. Sometimes they end up being the same size. Sometimes they don't.