Current Seed Value

I have a controlnet model. I want to find what is current seed value, Ididnt specify one.

pipe = StableDiffusionControlNetPipeline.from_pretrained(
    "mymodel", torch_dtype=torch.float16,
    controlnet=[
        controlnet_pose, 
        controlnet_hed
    ],
    ).to("cuda")

output = pipe(
        "my prompt", 
        [pose_image, hed_image],
        negative_prompt="low quality, wrong face, distorted, tikka, ugly, sunglasses, old",
        num_inference_steps=50,
).images[0]

Hi @AhmadMustafa, I don’t know of a way to retrieve the seed after the fact. If you want to be able to reproduce results, we recommend you set the seed explicitly using PyTorch generators, as shown in this article: Re-using seeds for fast prompt engineering

1 Like