Instructions to use yisol/IDM-VTON with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use yisol/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("yisol/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
diffusers\models\unet_2d_blocks.py:249: FutureWarning: `AutoencoderTinyBlock` is deprecated and will be removed in version 0.29
diffusers\models\unet_2d_blocks.py:249: FutureWarning: AutoencoderTinyBlock is deprecated and will be removed in version 0.29. Importing AutoencoderTinyBlock from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AutoencoderTinyBlock, instead.
deprecate("AutoencoderTinyBlock", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:254: FutureWarning: UNetMidBlock2D is deprecated and will be removed in version 0.29. Importing UNetMidBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import UNetMidBlock2D, instead.
deprecate("UNetMidBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:259: FutureWarning: UNetMidBlock2DCrossAttn is deprecated and will be removed in version 0.29. Importing UNetMidBlock2DCrossAttn from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import UNetMidBlock2DCrossAttn, instead.
deprecate("UNetMidBlock2DCrossAttn", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:264: FutureWarning: UNetMidBlock2DSimpleCrossAttn is deprecated and will be removed in version 0.29. Importing UNetMidBlock2DSimpleCrossAttn from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import UNetMidBlock2DSimpleCrossAttn, instead.
deprecate("UNetMidBlock2DSimpleCrossAttn", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:269: FutureWarning: AttnDownBlock2D is deprecated and will be removed in version 0.29. Importing AttnDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AttnDownBlock2D, instead.
deprecate("AttnDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:274: FutureWarning: CrossAttnDownBlock2D is deprecated and will be removed in version 0.29. Importing AttnDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import CrossAttnDownBlock2D, instead.
deprecate("CrossAttnDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:279: FutureWarning: DownBlock2D is deprecated and will be removed in version 0.29. Importing DownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import DownBlock2D, instead.
deprecate("DownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:284: FutureWarning: AttnDownEncoderBlock2D is deprecated and will be removed in version 0.29. Importing AttnDownEncoderBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AttnDownEncoderBlock2D, instead.
deprecate("AttnDownEncoderBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:289: FutureWarning: AttnSkipDownBlock2D is deprecated and will be removed in version 0.29. Importing AttnSkipDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AttnSkipDownBlock2D, instead.
deprecate("AttnSkipDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:294: FutureWarning: SkipDownBlock2D is deprecated and will be removed in version 0.29. Importing SkipDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import SkipDownBlock2D, instead.
deprecate("SkipDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:299: FutureWarning: ResnetDownsampleBlock2D is deprecated and will be removed in version 0.29. Importing ResnetDownsampleBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import ResnetDownsampleBlock2D, instead.
deprecate("ResnetDownsampleBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:304: FutureWarning: SimpleCrossAttnDownBlock2D is deprecated and will be removed in version 0.29. Importing SimpleCrossAttnDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import SimpleCrossAttnDownBlock2D, instead.
deprecate("SimpleCrossAttnDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:309: FutureWarning: KDownBlock2D is deprecated and will be removed in version 0.29. Importing KDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import KDownBlock2D, instead.
deprecate("KDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:314: FutureWarning: KCrossAttnDownBlock2D is deprecated and will be removed in version 0.29. Importing KCrossAttnDownBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import KCrossAttnDownBlock2D, instead.
deprecate("KCrossAttnDownBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:319: FutureWarning: AttnUpBlock2D is deprecated and will be removed in version 0.29. Importing AttnUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AttnUpBlock2D, instead.
deprecate("AttnUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:324: FutureWarning: CrossAttnUpBlock2D is deprecated and will be removed in version 0.29. Importing CrossAttnUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import CrossAttnUpBlock2D, instead.
deprecate("CrossAttnUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:329: FutureWarning: UpBlock2D is deprecated and will be removed in version 0.29. Importing UpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import UpBlock2D, instead.
deprecate("UpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:334: FutureWarning: UpDecoderBlock2D is deprecated and will be removed in version 0.29. Importing UpDecoderBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import UpDecoderBlock2D, instead.
deprecate("UpDecoderBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:339: FutureWarning: AttnUpDecoderBlock2D is deprecated and will be removed in version 0.29. Importing AttnUpDecoderBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AttnUpDecoderBlock2D, instead.
deprecate("AttnUpDecoderBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:344: FutureWarning: AttnSkipUpBlock2D is deprecated and will be removed in version 0.29. Importing AttnSkipUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import AttnSkipUpBlock2D, instead.
deprecate("AttnSkipUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:349: FutureWarning: SkipUpBlock2D is deprecated and will be removed in version 0.29. Importing SkipUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import SkipUpBlock2D, instead.
deprecate("SkipUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:354: FutureWarning: ResnetUpsampleBlock2D is deprecated and will be removed in version 0.29. Importing ResnetUpsampleBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import ResnetUpsampleBlock2D, instead.
deprecate("ResnetUpsampleBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:359: FutureWarning: SimpleCrossAttnUpBlock2D is deprecated and will be removed in version 0.29. Importing SimpleCrossAttnUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import SimpleCrossAttnUpBlock2D, instead.
deprecate("SimpleCrossAttnUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:364: FutureWarning: KUpBlock2D is deprecated and will be removed in version 0.29. Importing KUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import KUpBlock2D, instead.
deprecate("KUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:369: FutureWarning: KCrossAttnUpBlock2D is deprecated and will be removed in version 0.29. Importing KCrossAttnUpBlock2D from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import KCrossAttnUpBlock2D, instead.
deprecate("KCrossAttnUpBlock2D", "0.29", deprecation_message)
diffusers\models\unet_2d_blocks.py:375: FutureWarning: KAttentionBlock is deprecated and will be removed in version 0.29. Importing KAttentionBlock from diffusers.models.unet_2d_blocks is deprecated and this will be removed in a future version. Please use from diffusers.models.unets.unet_2d_blocks import KAttentionBlock, instead.