How to generate multiple images at once
#99
by
zhengjx
- opened
when i added The parameter "num_images_per_prompt" reported an error,
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 1 for tensor number 1 in the list.
image = pipe(
prompt = prompt,
negative_prompt = negative_prompt,
guidance_scale = guidance_scale,
num_images_per_prompt = 2,
num_inference_steps = num_inference_steps,
width = width,
height = height,
generator = generator
).images
You can do e.g. [prompt]*2, likewise for prompt2, negative_prompt, and not use the num_images_per_prompt parameter.