Tibron commited on
Commit
e4c7fb3
·
verified ·
1 Parent(s): 0c9bfbb

Update README

Browse files
Files changed (1) hide show
  1. README.md +4 -41
README.md CHANGED
@@ -168,7 +168,7 @@ pip install flashinfer-python==0.5.0
168
  ```bash
169
  # Download from HuggingFace and rename the directory.
170
  # Notice that the directory name should not contain dots, which may cause issues when loading using Transformers.
171
- hf download tencent/HunyuanImage-3.0-Instruct --local-dir ./HunyuanImage-3-Instruct
172
  ```
173
 
174
  ##### 2️⃣ Run with Transformers
@@ -177,8 +177,8 @@ hf download tencent/HunyuanImage-3.0-Instruct --local-dir ./HunyuanImage-3-Instr
177
  from transformers import AutoModelForCausalLM
178
 
179
  # Load the model
180
- model_id = "./HunyuanImage-3-Instruct"
181
- # Currently we can not load the model using HF model_id `tencent/HunyuanImage-3.0-Instruct` directly
182
  # due to the dot in the name.
183
 
184
  kwargs = dict(
@@ -208,7 +208,7 @@ cot_text, samples = model.generate_image(
208
  use_system_prompt="en_unified",
209
  bot_task="think_recaption", # Use "think_recaption" for reasoning and enhancement
210
  infer_align_image_size=True, # Align output image size to input image size
211
- diff_infer_steps=50,
212
  verbose=2
213
  )
214
 
@@ -216,31 +216,6 @@ cot_text, samples = model.generate_image(
216
  samples[0].save("image_edit.png")
217
  ```
218
 
219
- #### 🏠 Local Installation & Usage
220
-
221
- ##### 1️⃣ Clone the Repository
222
-
223
- ```bash
224
- git clone https://github.com/Tencent-Hunyuan/HunyuanImage-3.0.git
225
- cd HunyuanImage-3.0/
226
- ```
227
-
228
- ##### 2️⃣ Download Model Weights
229
-
230
- ```bash
231
- # Download from HuggingFace
232
- hf download tencent/HunyuanImage-3.0-Instruct --local-dir ./HunyuanImage-3-Instruct
233
- ```
234
-
235
- ##### 3️⃣ Run the Demo
236
-
237
- More demos in `run_demo_instruct.sh`.
238
-
239
- ```bash
240
- export MODEL_PATH="./HunyuanImage-3-Instruct"
241
- bash run_demo_instruct.sh
242
- ```
243
-
244
  ##### 4️⃣ Command Line Arguments
245
 
246
  | Arguments | Description | Recommended |
@@ -263,18 +238,6 @@ bash run_demo_instruct.sh
263
  | `--max_new_tokens` | Maximum number of new tokens to generate | `2048` |
264
  | `--use-taylor-cache` | Use Taylor Cache when sampling | `False` |
265
 
266
- ##### 5️⃣ For fewer Sampling Steps
267
-
268
- We recommend using the model [HunyuanImage-3.0-Instruct-Distil](https://huggingface.co/tencent/HunyuanImage-3.0-Instruct-Distil) with `--diff-infer-steps 8`, while keeping all other recommended parameter values **unchanged**.
269
-
270
- ```bash
271
- # Download HunyuanImage-3.0-Instruct-Distil from HuggingFace
272
- hf download tencent/HunyuanImage-3.0-Instruct-Distil --local-dir ./HunyuanImage-3-Instruct-Distil
273
-
274
- # Run the demo with 8 steps to samples
275
- export MODEL_PATH="./HunyuanImage-3-Instruct-Distil"
276
- bash run_demo_instruct_Distil.sh
277
- ```
278
 
279
  <details>
280
  <summary> Previous Version (Pure Text-to-Image) </summary>
 
168
  ```bash
169
  # Download from HuggingFace and rename the directory.
170
  # Notice that the directory name should not contain dots, which may cause issues when loading using Transformers.
171
+ hf download tencent/HunyuanImage-3.0-Instruct-Distil --local-dir ./HunyuanImage-3-Instruct-Distil
172
  ```
173
 
174
  ##### 2️⃣ Run with Transformers
 
177
  from transformers import AutoModelForCausalLM
178
 
179
  # Load the model
180
+ model_id = "./HunyuanImage-3-Instruct-Distil"
181
+ # Currently we can not load the model using HF model_id `tencent/HunyuanImage-3.0-Instruct-Distil` directly
182
  # due to the dot in the name.
183
 
184
  kwargs = dict(
 
208
  use_system_prompt="en_unified",
209
  bot_task="think_recaption", # Use "think_recaption" for reasoning and enhancement
210
  infer_align_image_size=True, # Align output image size to input image size
211
+ diff_infer_steps=8,
212
  verbose=2
213
  )
214
 
 
216
  samples[0].save("image_edit.png")
217
  ```
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  ##### 4️⃣ Command Line Arguments
220
 
221
  | Arguments | Description | Recommended |
 
238
  | `--max_new_tokens` | Maximum number of new tokens to generate | `2048` |
239
  | `--use-taylor-cache` | Use Taylor Cache when sampling | `False` |
240
 
 
 
 
 
 
 
 
 
 
 
 
 
241
 
242
  <details>
243
  <summary> Previous Version (Pure Text-to-Image) </summary>