{"library":"diffusers","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":[]}]}