You're confused. A Consulate handles Visas, an Embassy handles diplomatic relations, issues with their own citizens abroad etc. There is usually a Consulate attached to an Embassy, with employees who report to their Embassy superiors. There are also "local" Consulates in cities other than the capital city of a country who are solely responsible for Visa type activities, and they may be staffed by locals with a fair degree of autonomy and discretion. That's certainly the Thai model, but I'm not sure it applies generally