Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

philschmid
/
stable-diffusion-2-inpainting-endpoint

Image-to-Image
Diffusers
StableDiffusionInpaintPipeline
stable-diffusion
stable-diffusion-diffusers
text-guided-to-image-inpainting
endpoints-template
Model card Files Files and versions
xet
Community
3

Instructions to use philschmid/stable-diffusion-2-inpainting-endpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Diffusers

    How to use philschmid/stable-diffusion-2-inpainting-endpoint 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("philschmid/stable-diffusion-2-inpainting-endpoint", 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
stable-diffusion-2-inpainting-endpoint
2.58 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 12 commits
philschmid's picture
philschmid
Delete requirements.txt
13a0c9d over 2 years ago
  • scheduler
    add over 3 years ago
  • text_encoder
    add over 3 years ago
  • tokenizer
    add over 3 years ago
  • unet
    add over 3 years ago
  • vae
    add over 3 years ago
  • .gitattributes
    1.48 kB
    initial commit over 3 years ago
  • README.md
    2.9 kB
    Update README.md over 3 years ago
  • Stable Diffusion Inference endpoints - inpainting.png
    220 kB
    Upload Stable Diffusion Inference endpoints - inpainting.png over 3 years ago
  • create_handler.ipynb
    1.09 MB
    added custom handler over 3 years ago
  • dog.png
    405 kB
    add over 3 years ago
  • handler.py
    2.59 kB
    added custom handler over 3 years ago
  • mask_dog.png
    12.1 kB
    add over 3 years ago
  • model_index.json
    519 Bytes
    add over 3 years ago
  • result.png
    402 kB
    added custom handler over 3 years ago