Skip to content

Fix flux_train_ui startup on Gradio 6 by removing removed Image kwargs#777

Open
iqdoctor wants to merge 1 commit intoostris:mainfrom
iqdoctor:fix/flux-train-ui-gradio6-image-kwargs
Open

Fix flux_train_ui startup on Gradio 6 by removing removed Image kwargs#777
iqdoctor wants to merge 1 commit intoostris:mainfrom
iqdoctor:fix/flux-train-ui-gradio6-image-kwargs

Conversation

@iqdoctor
Copy link
Copy Markdown

@iqdoctor iqdoctor commented Apr 3, 2026

Fixes #776.

Summary

  • remove show_share_button=False from the gr.Image(...) used in flux_train_ui.py
  • remove show_download_button=False from the same component

Why

Gradio 6.x no longer accepts these kwargs, so flux_train_ui crashes while building the UI with:

TypeError: Image.__init__() got an unexpected keyword argument 'show_share_button'

Validation

env -u ALL_PROXY -u all_proxy -u HTTP_PROXY -u HTTPS_PROXY -u WS_PROXY -u WSS_PROXY -u http_proxy -u https_proxy \
  /data/iqdoctor/ai-toolkit/.venv/bin/python - <<'PY'
import flux_train_ui
print('import flux_train_ui OK')
PY

This now imports successfully on gradio 6.10.0.

Note: there is still a separate non-blocking Gradio 6 warning about theme / css being passed to Blocks(...); this PR intentionally keeps scope to the startup blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flux_train_ui fails on Gradio 6.x due to removed Image kwargs

1 participant