{"library":"diffusers","type":"library","category":null,"description":"Hugging Face library for state-of-the-art diffusion models: Stable Diffusion, FLUX, SDXL, video generation, and more. Current version is 0.37.1. Core API: DiffusionPipeline.from_pretrained(). Always set torch_dtype=torch.float16 or bfloat16 — default float32 causes OOM on most GPUs.","language":"python","status":"active","version":"0.37.1","tags":["diffusion","image-generation","stable-diffusion","flux","huggingface","text-to-image","video-generation"],"last_verified":"Tue Jun 09","install":[{"cmd":"pip install diffusers","imports":["from diffusers import DiffusionPipeline\nimport torch\n\npipe = DiffusionPipeline.from_pretrained(\n    'stable-diffusion-v1-5/stable-diffusion-v1-5',\n    torch_dtype=torch.float16  # REQUIRED — omitting uses float32 and will OOM on most GPUs\n)\npipe = pipe.to('cuda')\nimage = pipe('An astronaut on Mars').images[0]","def step_callback(pipe, step, timestep, callback_kwargs):\n    # process latents here\n    return callback_kwargs\n\nimage = pipe(\n    prompt,\n    callback_on_step_end=step_callback,\n    callback_on_step_end_tensor_inputs=['latents']\n).images[0]"]},{"cmd":"pip install diffusers[torch]","imports":[]},{"cmd":"pip install diffusers transformers accelerate","imports":[]}],"homepage":"https://huggingface.co/docs/diffusers","github":"https://github.com/huggingface/diffusers","docs":null,"changelog":null,"pypi":"https://pypi.org/project/diffusers/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":73,"avg_install_s":53.2,"avg_import_s":7.52,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/diffusers/compatibility"}}