I have the same problem on my 16valve, but only when hot. Occasionally the idle drops and it will stall if not held up by the accelerator, and it just dies if I try to driveaway. It runs fine when cold or warming up. I have my mixture display hooked up and it leans out when idling (as normal) but doesn't richen back up to drive away.
I took the fuel return line off and ran it into a bottle to check if it had fuel pressure in the rail, as it just feels like it has run out of fuel, & I was surprised how much flowed out in a few seconds. I figure if you do that it means there is plenty of fuel available for the motor to rev.
I figure it could be the TPS, maybe the fuel delivery to the main pump, maybe the oxy sensor. ..and the Toyota advice of last resort, 'try another ECU'..
If it was an air leak the ECU would compensate for it via the oxy sensor and the idle would go up. Does the 20valve have the vac line on the fpr that acts as an accelerator pump to get it reving?