File size: 5,976 Bytes
959334b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e8271f7
 
e98cbf2
 
e8271f7
 
 
 
 
 
 
e98cbf2
959334b
 
 
 
 
 
 
 
 
 
c636e11
 
 
959334b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
tags:
- text-to-image
- lora
- adapter
- hunyuanimage-3.0
widget:
- output:
    url: images/image_0.png
  text: Astronaut riding horse on moon in naruto style.
- output:
    url: images/image_1.png
  text: Orange building corner with shadows in naruto style.
- output:
    url: images/image_2.png
  text: Asian woman in red velvet chair in naruto style.
- output:
    url: images/image_3.png
  text: An image of bill gates in a black shirt in naruto style.
- output:
    url: images/image_4.png
  text: An astronaut riding a rainbow unicorn on the moon in naruto style.
- output:
    url: images/image_5.png
  text: Four rabbits in different colors in naruto style.
base_model: tencent/HunyuanImage-3.0
base_model_relation: adapter
instance_prompt: in naruto style.
datasets:
- lambdalabs/naruto-blip-captions
language:
- en
license: other
license_name: tencent-hunyuan-community
license_link: https://huggingface.co/tencent/HunyuanImage-3.0/blob/main/LICENSE
extra_gated_prompt: >
  This adapter is a Model Derivative of tencent/HunyuanImage-3.0 and is
  distributed under the Tencent Hunyuan Community License Agreement. By
  requesting access, you confirm that:
    •  You will use it only for non-commercial research or personal use;
    •  You will respect third-party IP rights;
    •  You will not use the model to create harmful or NSFW content;
    •  You are not located in the EU, UK, or South Korea.
extra_gated_fields:
  I agree to use this model for non-commercial use ONLY: checkbox
  I confirm I am not located in the EU, UK, or South Korea: checkbox
library_name: adapter-transformers
---
# HunyuanImage-3.0-Naruto-Style-Adapter

<Gallery />


## Trigger words

You should use `in naruto style.` at the **end of the prompt** to trigger the image generation.

## Training

We use [this repo](https://github.com/PhotonAISG/hunyuan-image3-finetune) for training.

## License

This adapter is a Model Derivative of [tencent/HunyuanImage-3.0](https://huggingface.co/tencent/HunyuanImage-3.0)
and is distributed under the **Tencent Hunyuan Community License Agreement**.

Use of these weights must comply with the Tencent Hunyuan Community License and its
territorial and usage restrictions. See the [LICENSE](./LICENSE) and [NOTICE](./NOTICE)
files in this repository for details.

This project is **not affiliated with, associated with, sponsored by, or endorsed by Tencent**.


## Usage and Restrictions

- This model/adapter is provided for **non-commercial research and personal use only**.  
  Commercial use (including using the model or its outputs in a paid product, service, or large-scale deployment) is **not permitted** without obtaining appropriate permissions and verifying all relevant rights.

- Users **must** comply with:
  - The **Tencent Hunyuan Community License Agreement** (including territory and acceptable-use limitations).
  - Any applicable copyright, trademark, and other IP rights in the **Naruto** franchise and any other third-party content.

- You are solely responsible for ensuring that your use of this adapter and any generated outputs respects third-party IP and applicable laws in your jurisdiction.


---


## Model Details

### Model Description

- **Developed by:** Pixo
- **Model type:** LoRA/adapter for style transfer
- **License:** Tencent Hunyuan Community License Agreement
- **Finetuned from model:** tencent/HunyuanImage-3.0
- **Language(s):** English prompts


### Dataset

This model uses the **Naruto BLIP captions** dataset.

The dataset authors provide the following citation:
```bibtex
@misc{cervenka2022naruto2,
      author = {Cervenka, Eole},
      title = {Naruto BLIP captions},
      year={2022},
      howpublished= {\url{https://huggingface.co/datasets/lambdalabs/naruto-blip-captions/}}
}
```


## Uses

### Direct Use

- Apply a Naruto-style anime aesthetic to images generated by HunyuanImage-3.0.
- Use by loading the base model and applying this adapter.
- Trigger phrase: `in naruto style.` (must be at the end)

### Out-of-Scope Use

- Harmful, deceptive, or NSFW content.
- Any use that violates the Tencent Hunyuan Community License Agreement.
- Any use that infringes third-party IP (including *Naruto* and other copyrighted characters).
- Commercial use of the model or its outputs.

## Bias, Risks, and Limitations

- Trained on a small amount of images, so the style may overfit.
- May distort anatomy or realism on complex subjects.
- Style is intentionally exaggerated in anime fashion.

## How to Get Started with the Model

1️⃣ **Download and clone the HunyuanImage-3.0 repo**
```bash
git clone https://github.com/Tencent-Hunyuan/HunyuanImage-3.0.git
cd HunyuanImage-3.0/

# Download base model
hf download tencent/HunyuanImage-3.0 --local-dir ./HunyuanImage-3
```

2️⃣ **Download the adapter**
```bash
# Download from HuggingFace
hf download pixosg/HunyuanImage-3.0-Naruto-Style-Adapter --local-dir ./hunyuanimage-3-naruto-style-adapter
```

3️⃣ **Load the base model and adapter**
```python
from peft import PeftModel
from hunyuan_image_3.hunyuan import HunyuanImage3ForCausalMM
import torch

model_id = "./HunyuanImage-3"
adapter_model_path = "./hunyuanimage-3-naruto-style-adapter"

kwargs = dict(
    attn_implementation="sdpa", # Use "flash_attention_2" if FlashAttention is installed
    trust_remote_code=True,
    dtype=torch.bfloat16,
    device_map="auto",
    moe_impl="eager",
    moe_drop_tokens=True,
)

model = HunyuanImage3ForCausalMM.from_pretrained(model_id, **kwargs)
model.load_tokenizer(model_id)

# Option 1
model.load_adapter(adapter_model_path)

# Option 2
model.get_input_embeddings = lambda: model.model.wte
model.set_input_embeddings = lambda value: setattr(model.model, 'wte', value)
model = PeftModel.from_pretrained(model, adapter_model_path, trust_remote_code=True)

# Generate image
prompt = "Astronaut riding horse on moon in naruto style."
image = model.generate_image(prompt=prompt, stream=True)
image.save("image.png")
```