--- license: other license_name: tencent-hunyuan-community license_link: https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/blob/main/LICENSE.txt language: - en --- ## Using HunyuanDiT IP-Adapter ### Instructions The dependencies and installation are basically the same as the base model, and we use the module weights for training. Download the model using the following commands: ```bash cd HunyuanDiT # Use the huggingface-cli tool to download the model. # We recommend using module weights as the base model for IP-Adapter inference, as our provided pretrained weights are trained on them. huggingface-cli download Tencent-Hunyuan/IP-Adapter/ipa.pt --local-dir ./ckpts/t2i/model huggingface-cli download Tencent-Hunyuan/IP-Adapter/clip_img_encoder.pt --local-dir ./ckpts/t2i/model/clip_img_encoder # Quick start python3 sample_ipadapter.py --infer-mode fa --ref-image-path ipadapter/input/tiger.png --i-scale 1.0 --prompt 一只老虎在海洋中游泳,背景是海洋。构图方式是居中构图,呈现了动漫风格和文化,营造了平静的氛围。 --infer-steps 100 --is-ipa True --load-key module ``` Examples of ref input and IP-Adapter results are as follows:
Ref Input | ||
IP-Adapter Output | ||
一只老虎在奔跑。 (A tiger running.) |
一个卡通美女,抱着一只小猪。 (A cartoon beauty holding a little pig.) |
一片紫色薰衣草地。 (A purple lavender field.) |
一只老虎在看书。 (A tiger is reading a book.) |
一个卡通美女,穿着绿色衣服。 (A cartoon beauty wearing green clothes.) |
一片紫色薰衣草地,有一只可爱的小狗。 (A purple lavender field with a cute puppy.) |
一只老虎在咆哮。 (A tiger is roaring.) |
一个卡通美女,戴着墨镜。 (A cartoon beauty wearing sunglasses.) |
水墨风格,一片紫色薰衣草地。 (Ink style. A purple lavender field.) |