def reset(self): self.layers = {} self.stop_event = multiprocessing.get_context('spawn').Event() self.input_prompts = multiprocessing.get_context('spawn').Queue()