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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

lee45
/
IDM-VTON

Image-to-Image
Diffusers
ONNX
Safetensors
StableDiffusionXLInpaintPipeline
Model card Files Files and versions
xet
Community

Instructions to use lee45/IDM-VTON with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Diffusers

    How to use lee45/IDM-VTON with Diffusers:

    pip install -U diffusers transformers accelerate
    import torch
    from diffusers import AutoPipelineForInpainting
    from diffusers.utils import load_image
    
    # switch to "mps" for apple devices
    pipe = AutoPipelineForInpainting.from_pretrained("lee45/IDM-VTON", dtype=torch.float16, device_map="cuda")
    
    img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
    mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"
    
    image = load_image(img_url).resize((1024, 1024))
    mask_image = load_image(mask_url).resize((1024, 1024))
    
    prompt = "a tiger sitting on a park bench"
    generator = torch.Generator(device="cuda").manual_seed(0)
    
    image = pipe(
      prompt=prompt,
      image=image,
      mask_image=mask_image,
      guidance_scale=8.0,
      num_inference_steps=20,  # steps between 15 and 30 work well for us
      strength=0.99,  # make sure to use `strength` below 1.0
      generator=generator,
    ).images[0]
  • Notebooks
  • Google Colab
  • Kaggle
IDM-VTON
29.4 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 63 commits
lee45's picture
lee45
Rename unet_encoder/diffusion_pytorch_model .safetensors to unet_encoder/diffusion_pytorch_model.safetensors
82d9880 verified over 2 years ago
  • densepose
    hello over 2 years ago
  • humanparsing
    hello over 2 years ago
  • image_encoder
    Rename image_encoder/image_encoder_config.json to image_encoder/config.json over 2 years ago
  • openpose
    hello over 2 years ago
  • scheduler
    Rename scheduler/scheduler_scheduler_config.json to scheduler/scheduler_config.json over 2 years ago
  • text_encoder
    Rename text_encoder/text_encoder_config.json to text_encoder/config.json over 2 years ago
  • text_encoder_2
    Rename text_encoder_2/text_encoder_2_config.json to text_encoder_2/config.json over 2 years ago
  • tokenizer
    Rename tokenizer/tokenizer_vocab.json to tokenizer/vocab.json over 2 years ago
  • tokenizer_2
    Rename tokenizer_2/tokenizer_2_vocab.json to tokenizer_2/vocab.json over 2 years ago
  • unet
    Rename unet/unet_config.json to unet/config.json over 2 years ago
  • unet_encoder
    Rename unet_encoder/diffusion_pytorch_model .safetensors to unet_encoder/diffusion_pytorch_model.safetensors over 2 years ago
  • vae
    Rename vae/vae_config.json to vae/config.json over 2 years ago
  • .gitattributes
    1.52 kB
    initial commit over 2 years ago
  • README.md
    31 Bytes
    initial commit over 2 years ago
  • model_index.json
    750 Bytes
    Upload model_index.json over 2 years ago