We'll see. The cynical side of me says this is just a practical move by the junta to clear the prisons and appease the people. Letting nonviolent offenders free makes this law an unqualified good in itself though.
Even though factors relating to the overcrowded prison may come into play, I tend to believe the actual reason is to appease base voters. Current Minister of Public Health is the leader of a political party whose campaign in 2019 election revolves around the legalization of cannabis (probably the only major party). In a sense, it can be viewed as fulfilling promises they promoted back then.
Hopefully they'll see the benefit even if they did it for the "wrong" reasons