Skip to content

Commit

Permalink
fix code style flux (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Aug 23, 2024
1 parent 993665b commit 6771c7a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@
],
"source": [
"from notebook_utils import device_widget\n",
"\n",
"device = device_widget(default=\"CPU\", exclude=[\"NPU\"])\n",
"device"
]
Expand Down
1 change: 0 additions & 1 deletion notebooks/flux.1-image-generation/flux_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ def _get_clip_prompt_embeds(
prompt: Union[str, List[str]],
num_images_per_prompt: int = 1,
):

prompt = [prompt] if isinstance(prompt, str) else prompt
batch_size = len(prompt)

Expand Down
4 changes: 0 additions & 4 deletions notebooks/flux.1-image-generation/gradio_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_in
return image, seed

with gr.Blocks(css=css) as demo:

with gr.Column(elem_id="col-container"):
gr.Markdown(f"""# FLUX.1 OpenVINO demo""")

with gr.Row():

prompt = gr.Text(
label="Prompt",
show_label=False,
Expand All @@ -50,7 +48,6 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_in
result = gr.Image(label="Result", show_label=False)

with gr.Accordion("Advanced Settings", open=False):

seed = gr.Slider(
label="Seed",
minimum=0,
Expand All @@ -62,7 +59,6 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_in
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)

with gr.Row():

width = gr.Slider(
label="Width",
minimum=256,
Expand Down

0 comments on commit 6771c7a

Please sign in to comment.