Image-to-Image
Diffusers
StableDiffusionImageVariationPipeline
stable-diffusion
stable-diffusion-diffusers
Instructions to use lambda/sd-image-variations-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lambda/sd-image-variations-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lambda/sd-image-variations-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Commit History
-
Add `clip_sample=False` to scheduler to make model compatible with DDIM.
Hey lambdalabs 👋, Your model repository seems to contain a stable diffusion checkpoint. We have noticed that your scheduler config currently does not correctly work with the [DDIMScheduler](https://huggingface.co/docs/diffusers/main/en/api/schedulers#diffusers.DDIMScheduler) because `clip_sample` is not set to False and will therefore [incorrectly default to True](https://github.com/huggingface/diffusers/blob/3ce6380d3a2ec5c3e3f4f48889d380d657b151bc/src/diffusers/schedulers/scheduling_ddim.py#L127). The official stable diffusion checkpoints have `clip_sample=False` so that the scheduler config works will **all** schedulers, see: https://huggingface.co/stabilityai/stable-diffusion-2-1-base/blob/main/scheduler/scheduler_config.json#L7. We strongly recommend that you merge this PR to make sure your model works correctly with DDIM. Diffusingly, Patrick.f0c29c0
-
update model and readme for v2
a2a1398
-
use-clip-vision-head (#4)
- use only vision model (e1f3a0855d0e0cf9eca99de331597226797ad902) Co-authored-by: Suraj Patil <valhalla@users.noreply.huggingface.co>a430b6b
-
Update scheduler/scheduler_config.json (#1)
- Update scheduler/scheduler_config.json (df2a166f66fa5351f0d3b816b6ac2f4037c1c945) Co-authored-by: Patrick von Platen <patrickvonplaten@users.noreply.huggingface.co>2ddbd90
-
Upload with huggingface_hub
273115e