AN illegal immigrant who grew commercial quantities of cannabis inside an Alfredton home with the help of a prostitute he was paying to service him, has been jailed for nine months.

The sex worker, whose visa expires within weeks and is likely to be deported, has avoided an immediate jail term.

Trang Van Nguyen, 28, and co-accused, Sih-Yu Wu, 32, who Nguyen met at a Melbourne brothel in 2012, were sentenced by County Court Judge Frank Gucciardo on Tuesday.

Wu was sentenced to six months' jail, wholly suspended for 12 months, with Judge Gucciardo accepting her part in the cultivation of almost 200 plants was "on the fringe" and "minimal".

Discount was also given due to the fact she had spent 58 days on remand after her arrest last year.

Nguyen had previously pleaded guilty to cultivating a commercial quantity of cannabis, while Wu pleaded guilty to cultivating cannabis.

Judge Gucciardo said Ballarat police raided the Leicester Court grow house on September 3 last year, uncovering a sophisticated hydroponic set-up consisting of 187 plants weighing almost 110 kilograms.

He said Nguyen and Wu ran from police, with police managing to arrest Wu while Nguyen fled.

Nguyen was arrested in March, after months on the run.

Judge Gucciardo said Nguyen, a trained chef from Vietnam who previously had no criminal history, had been living in Ballarat and agreed to work as a "sitter" because he lost thousands of dollars gambling.

The judge said Nguyen worked for other men and was instructed to water the crop twice a day.

"There is no real lower role in the hierarchy of cultivation," Judge Gucciardo said in respect of the "sitter" role.

But the judge said Nguyen's conduct had to be denounced because he had benefited from his role.

The court heard Nguyen had already been paid $5000 for his work and was expecting another $2000 from the men he was working for.

"Even those at the lower end... must expect punishment for their conduct which the courts must denounce and deter others from engaging in," Judge Gucciardo said.

The Judge said Nguyen would be put in a detention centre after serving his sentence and eventually deported back to Vietnam.

The court heard Wu could also suffer a similar fate, with her working visa due to expire within weeks.