Instructions to use AndrewChoyCS/Mobile-VTON with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AndrewChoyCS/Mobile-VTON 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("AndrewChoyCS/Mobile-VTON", 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
| { | |
| "_class_name": "UNet2DConditionModel", | |
| "_diffusers_version": "0.32.2", | |
| "_name_or_path": "/data02/zhenchen/VTO_mobile/result/cat_final/checkpoint-8280", | |
| "act_fn": "hardswish", | |
| "addition_embed_type": null, | |
| "addition_embed_type_num_heads": 64, | |
| "addition_time_embed_dim": 256, | |
| "attention_head_dim": [ | |
| 4, | |
| 8, | |
| 14 | |
| ], | |
| "attention_type": "default", | |
| "attn_module": "Attention", | |
| "attn_processor_type": "AttnProcessor2_0", | |
| "block_out_channels": [ | |
| 256, | |
| 512, | |
| 896 | |
| ], | |
| "center_input_sample": false, | |
| "class_embed_type": null, | |
| "class_embeddings_concat": false, | |
| "context_embedding_caption_projection_dim": 2048, | |
| "context_embedding_text_embedding_dim": 4096, | |
| "conv_in_dw_bias": true, | |
| "conv_in_kernel": 3, | |
| "conv_in_module": "Conv2d", | |
| "conv_in_pw_bias": false, | |
| "conv_out_dw_bias": true, | |
| "conv_out_kernel": 3, | |
| "conv_out_module": "Conv2d", | |
| "conv_out_pw_bias": false, | |
| "cross_attention_dim": 4096, | |
| "cross_attention_norm": null, | |
| "down_block_ff_mult": 3, | |
| "down_block_kv_heads": 1, | |
| "down_block_qk_norm": "layer_norm", | |
| "down_block_resnet_dw_bias": true, | |
| "down_block_resnet_middle_expansion": 2, | |
| "down_block_resnet_middle_expansion_type": "input", | |
| "down_block_resnet_pw_bias": false, | |
| "down_block_types": [ | |
| "CrossAttnDownBlock2D", | |
| "CrossAttnDownBlock2D", | |
| "CrossAttnDownBlock2D" | |
| ], | |
| "down_block_use_self_attention": [ | |
| false, | |
| false, | |
| true | |
| ], | |
| "downsample_conv_module": "SepConv2d", | |
| "downsample_module": "Downsample2D", | |
| "downsample_padding": 1, | |
| "dropout": 0.0, | |
| "dual_cross_attention": false, | |
| "encoder_hid_dim": null, | |
| "encoder_hid_dim_type": "ip_image_proj", | |
| "encoder_type": "dinov2_base", | |
| "flip_sin_to_cos": true, | |
| "freq_shift": 0, | |
| "height": 2048, | |
| "in_channels": 32, | |
| "layers_per_block": 2, | |
| "mid_block_ff_mult": 3, | |
| "mid_block_kv_heads": 1, | |
| "mid_block_only_cross_attention": null, | |
| "mid_block_qk_norm": "layer_norm", | |
| "mid_block_resnet_dw_bias": true, | |
| "mid_block_resnet_middle_expansion": 2, | |
| "mid_block_resnet_middle_expansion_type": "input", | |
| "mid_block_resnet_pw_bias": false, | |
| "mid_block_scale_factor": 1, | |
| "mid_block_type": "UNetMidBlock2DCrossAttn", | |
| "mid_block_use_additional_resnet": false, | |
| "mid_block_use_self_attention": true, | |
| "norm_eps": 1e-05, | |
| "norm_num_groups": 32, | |
| "num_attention_heads": null, | |
| "num_class_embeds": null, | |
| "only_cross_attention": false, | |
| "out_channels": 16, | |
| "pooled_projection_dim": 2048, | |
| "projection_class_embeddings_input_dim": 2816, | |
| "resnet_conv_module": "SepConv2d", | |
| "resnet_module": "ResnetBlock2D", | |
| "resnet_out_scale_factor": 1.0, | |
| "resnet_skip_time_act": false, | |
| "resnet_time_scale_shift": "default", | |
| "reverse_transformer_layers_per_block": null, | |
| "sample_size": 128, | |
| "time_cond_proj_dim": null, | |
| "time_embedding_act_fn": null, | |
| "time_embedding_dim": null, | |
| "time_embedding_module": "TimestepEmbedding", | |
| "time_embedding_type": "positional", | |
| "time_text_embedding_act_fn": "hardswish", | |
| "time_text_embedding_mode": "default", | |
| "time_text_embedding_module": "CombinedTimestepTextProjEmbeddings", | |
| "time_text_embedding_pooled_projection_dim": 2048, | |
| "time_text_embedding_time_embed_dim": 896, | |
| "timestep_post_act": null, | |
| "transformer2d_model_type": "Transformer2DModel", | |
| "transformer_block_type": "BasicTransformerBlockTryOn", | |
| "transformer_layers_per_block": [ | |
| 1, | |
| 2, | |
| 4 | |
| ], | |
| "up_block_ff_mult": 3, | |
| "up_block_kv_heads": 1, | |
| "up_block_qk_norm": "layer_norm", | |
| "up_block_receive_additional_residuals": [ | |
| false, | |
| true, | |
| true | |
| ], | |
| "up_block_resnet_dw_bias": true, | |
| "up_block_resnet_middle_expansion": 2, | |
| "up_block_resnet_middle_expansion_type": "input", | |
| "up_block_resnet_pw_bias": false, | |
| "up_block_types": [ | |
| "CrossAttnUpBlock2D", | |
| "CrossAttnUpBlock2D", | |
| "UpBlock2D" | |
| ], | |
| "up_block_use_self_attention": [ | |
| true, | |
| false, | |
| false | |
| ], | |
| "upcast_attention": null, | |
| "upsample_conv_module": "SepConv2d", | |
| "upsample_module": "Upsample2D", | |
| "use_linear_projection": true, | |
| "use_pooled_projection": false, | |
| "use_rope": true, | |
| "width": 768 | |
| } | |