If any of grow material is coming from outside: pots, tools, open bag of compost- the gnats can attach their larve to that object, it doesn't take long. What happen to me was I repotted my indoor grow plants outside, nice day, into fabric pots. I let one pot stay outside for an hour. became distracted etc. That was all it took for an infestation. I brought that larve from outside into the grow room. I have the little bastards making an appearance presently. they hung around.
But, I do like the grow in a fabrique pot because I have found that the overall bud size improved. Just dont do what I did. I ended up washing the pots in white vinegar, air dried.