Instead of raising StopIteration you could also just return from the function. You could also make it a bit shorter if you swap the if branches.
def f_iter(many, args):
while True:
m = f(many, args)
if not m:
return
yield m