How can I fix a seed with stable diffusion 2.0?
shivangibithel opened this issue · 3 comments
shivangibithel commented
How can I fix a seed with stable diffusion 2.0?
woctezuma commented
I would set a generator with a seed, but I have not tried to see if this works as expected.
shivangibithel commented
This is not working with v2. I used this with stable diffusion v1 and it used to work there.
woctezuma commented
I have checked and this works fine with all three models.
images = pipe(
prompt,
height = image_length,
width = image_length,
num_inference_steps = 25,
guidance_scale = 9,
num_images_per_prompt = num_images,
negative_prompt = negative_prompt,
generator = [torch.Generator(device).manual_seed(i) for i in range(num_images)]
).images
Tested with:
model_id = "stabilityai/stable-diffusion-2-1-base"
model_id = "stabilityai/stable-diffusion-2-1"
model_id = "dreamlike-art/dreamlike-photoreal-2.0"