prompt = 'simulating a human brain'

# text embeds
prompt_embeds, negative_embeds = stage_1.encode_prompt(prompt)

# Get the current time (in seconds since the Epoch) as an integer
seed = int(time.time())
generator = torch.manual_seed(seed)

# stage 1
image = stage_1(prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_embeds, generator=generator, output_type="pt").images
pt_to_pil(image)[0].save("./if_stage_I.png")

# stage 2
image = stage_2(
    image=image, prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_embeds, generator=generator, output_type="pt"
).images
pt_to_pil(image)[0].save("./if_stage_II.png")