Instructions to use stabilityai/stable-diffusion-3-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use stabilityai/stable-diffusion-3-medium with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Inference
- Notebooks
- Google Colab
- Kaggle
How to generate multiple images at once
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.
Hello How do i get multiple images in 1 prompt.. I need atleast 3 right now i was trying with hugging face inference sdk with textToImage and i dont see any options to pass number of images and it always returns 1