Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/gradio_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,6 @@ def get_quant_scheme(quant_detected, quant_op_val):

# Set zero_cond_t to true (2511 feature)
qwen_image_config["zero_cond_t"] = True
qwen_image_config["_auto_resize"] = True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This refactoring from _auto_resize to resize_mode has an unintended side effect. The new resize_mode is now hardcoded to "adaptive" for all model types in config_graio (line 1645), whereas _auto_resize was previously only enabled for qwen_image models. This changes the resizing behavior for wan2.1 and wan2.2 models in the Gradio demo.

To maintain the original behavior, resize_mode should only be set for qwen_image models. I recommend moving the resize_mode setting from config_graio into this qwen_image_config block.

You can replace the removed line with the new config key, and then remove the hardcoded resize_mode from config_graio.

Suggested change
qwen_image_config["_auto_resize"] = True
qwen_image_config["resize_mode"] = "adaptive"

qwen_image_config["attn_type"] = attention_type

config_graio = {
Expand Down
1 change: 0 additions & 1 deletion app/gradio_demo_zh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,6 @@ def get_quant_scheme(quant_detected, quant_op_val):

# zero_cond_t 设置为 true(2511 的特性)
qwen_image_config["zero_cond_t"] = True
qwen_image_config["_auto_resize"] = True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This refactoring from _auto_resize to resize_mode has an unintended side effect. The new resize_mode is now hardcoded to "adaptive" for all model types in config_graio (line 1645), whereas _auto_resize was previously only enabled for qwen_image models. This changes the resizing behavior for wan2.1 and wan2.2 models in the Gradio demo.

To maintain the original behavior, resize_mode should only be set for qwen_image models. I recommend moving the resize_mode setting from config_graio into this qwen_image_config block.

You can replace the removed line with the new config key, and then remove the hardcoded resize_mode from config_graio.

Suggested change
qwen_image_config["_auto_resize"] = True
qwen_image_config["resize_mode"] = "adaptive"

qwen_image_config["attn_type"] = attention_type

config_graio = {
Expand Down
2 changes: 1 addition & 1 deletion configs/qwen_image/qwen_image_i2i_layered.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"transformer_in_channels": 64,
"prompt_template_encode": "<|im_start|>system\nDescribe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:<|im_end|>\n<|im_start|>user\n{}<|im_end|>\n<|im_start|>assistant\n",
"prompt_template_encode_start_idx": 34,
"_auto_resize": true,
"resize_mode": "adaptive",
"num_layers": 60,
"attention_out_dim": 3072,
"attention_dim_head": 128,
Expand Down
1 change: 0 additions & 1 deletion configs/qwen_image/qwen_image_t2i_2512_lora.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"infer_steps": 4,
"prompt_template_encode": "<|im_start|>system\nDescribe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:<|im_end|>\n<|im_start|>user\n{}<|im_end|>\n<|im_start|>assistant\n",
"prompt_template_encode_start_idx": 34,
"_auto_resize": false,
"num_layers": 60,
"attention_out_dim": 3072,
"attention_dim_head": 128,
Expand Down