seed = ui_scalar('seed', 1, 1, 1024)
(line 40) emit(translate(state.origin) * sphere(radius), state.brush)
you're using 'emit' inside a recursive tree function that is gonna be called god knows how many times. Each emit does a union of the shape being emitted with the ones already emitted. There's a limit to union (e.g. lower the initial branching to 20 and it works fine, at least in my pc)
I suggest you save the whole shape a-priori in each calculation with a merge operation. If you wanna keep the ui to change this on the spot, you have to sacrifice changing parameters via UI that will change the whole tree calculation.
Salim.