Yes, there were Invalid Corps both North and South.
I know that the Northern corps members were often used to guard prisoners, and that they had a distinct uniform of sky blue jacket and trousers.
The Southern corps members were typically assigned desk duty, theoretically to free up able-bodied men for field service.
See you at the next "Fossil Guards" drill, which, I'm assuming, won't be too strenuous on us!!! -- Jim H.