Hidiffusion
A training-free method that increases the resolution and speed of pretrained diffusion models.
Tip
- Supports sdxl and sd1.5 text2image, image2image controlnet and inpainting
- Use with DDIMScheduler
SDXL example usage and results.
To use with any other sd1.5 or sdxl endpoint just add the param "hidiffusion": true
- With hidiffusion
- Without hidiffusion
https://api.imagepipeline.io/sdxl/text2image/v1
API-Key
{
"seed": 5688,
"width": 1024,
"height": 1024,
"prompt": "a fish next to dendrobium flowers, ultrarealistic, highly detailed, 8k",
"samples": 1,
"model_id": "d961a274-658c-4889-8c1a-bf85416cb1c1",
"scheduler": "DDIMScheduler", //Use DDIMScheduler for best results
"guidance_scale": 5, //Guidance scale value needs to be between 3-5
"negative_prompt": "deformed anatomy",
"num_inference_steps": 25,
"hidiffusion": true
}
https://api.imagepipeline.io/sdxl/text2image/v1
API-Key
{
"seed": 5688,
"width": 1024,
"height": 1024,
"prompt": "a fish next to dendrobium flowers, ultrarealistic, highly detailed, 8k",
"samples": 1,
"model_id": "d961a274-658c-4889-8c1a-bf85416cb1c1",
"scheduler": "DDIMScheduler",
"guidance_scale": 5,
"negative_prompt": "deformed anatomy",
"num_inference_steps": 25,
"hidiffusion": false
}
JSON Parameters
Parameter | Permissible values | Notes |
---|---|---|
model_id | str | model_id can be found in models page. Filter by SD-1.5 or SDXL models |
prompt | str, 75 tokens | Check our Prompt Guide for tips |
negative_prompt | str, 75 tokens | Check our Prompt Guide for tips |
num_inference_steps | int, [1-100] | Noise is removed with each step, resulting in a higher-quality image over time. Ideal value 20-30 |
samples | int, [1-4] | Generates a maximum of 4 samples per API call |
guidance_scale | float, [1-20] | Higher guidance scale prioritizes text prompt relevance but sacrifices image quality. Ideal value 7.5-12.5 |
width | int | Width in pixels. Lower than or equal to 1024 for best results |
height | int | Height in pixels. Lower than or equal to 1024 for best results |
hidiffusion | bool | Set to true for better image quality and faster inference |