Skip to content

Commit

Permalink
Improve FLUX tool for output label and prompt display (#1551)
Browse files Browse the repository at this point in the history
* Improve output label based on input type and print the prompt itself

* Update version suffix in flux from 3 to 4
  • Loading branch information
arash77 authored Dec 2, 2024
1 parent f8d8a93 commit d9ac789
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tools/flux/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
prompt = f.read().strip()
elif prompt_type == "text":
prompt = sys.argv[3]
print(f"Creating image from prompt: {prompt}")

if "dev" in model_path:
num_inference_steps = 20
Expand Down
4 changes: 2 additions & 2 deletions tools/flux/flux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>text-to-image model</description>
<macros>
<token name="@TOOL_VERSION@">2024</token>
<token name="@VERSION_SUFFIX@">3</token>
<token name="@VERSION_SUFFIX@">4</token>
</macros>
<requirements>
<container type="docker">quay.io/galaxy/black_forest_labs_flux:2024-0</container>
Expand Down Expand Up @@ -39,7 +39,7 @@ python3 '$__tool_directory__/flux.py'
</conditional>
</inputs>
<outputs>
<data name="output" format="png" label="${tool.name} on ${on_string}" from_work_dir="./output.png"/>
<data name="output" format="png" label="${tool.name} on ${on_string if $input_type_selector=='file' else 'text prompt'}" from_work_dir="./output.png"/>
</outputs>
<tests>
<test expect_exit_code="1" expect_failure="true">
Expand Down

0 comments on commit d9ac789

Please sign in to comment.