Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
15 |
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16).to("cuda")
|
16 |
|
17 |
@spaces.GPU
|
18 |
-
def infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.5, steps=
|
19 |
"""
|
20 |
Perform image editing using the FLUX.1 Kontext pipeline.
|
21 |
|
@@ -32,7 +32,7 @@ def infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.5
|
|
32 |
Defaults to False.
|
33 |
guidance_scale (float, optional): Controls how closely the model follows the prompt. Higher values mean stronger adherence to the prompt but may reduce image quality. Range: 1.0-10.0. Defaults to 2.5.
|
34 |
steps (int, optional): Controls how many steps to run the diffusion model for.
|
35 |
-
Range: 1-30. Defaults to
|
36 |
progress (gr.Progress, optional): Gradio progress tracker for monitoring
|
37 |
generation progress. Defaults to gr.Progress(track_tqdm=True).
|
38 |
|
@@ -116,7 +116,7 @@ Image editing and manipulation model guidance-distilled from FLUX.1 Kontext [pro
|
|
116 |
label="Steps",
|
117 |
minimum=1,
|
118 |
maximum=30,
|
119 |
-
value=
|
120 |
step=1
|
121 |
)
|
122 |
|
|
|
15 |
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16).to("cuda")
|
16 |
|
17 |
@spaces.GPU
|
18 |
+
def infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.5, steps=20, progress=gr.Progress(track_tqdm=True)):
|
19 |
"""
|
20 |
Perform image editing using the FLUX.1 Kontext pipeline.
|
21 |
|
|
|
32 |
Defaults to False.
|
33 |
guidance_scale (float, optional): Controls how closely the model follows the prompt. Higher values mean stronger adherence to the prompt but may reduce image quality. Range: 1.0-10.0. Defaults to 2.5.
|
34 |
steps (int, optional): Controls how many steps to run the diffusion model for.
|
35 |
+
Range: 1-30. Defaults to 20.
|
36 |
progress (gr.Progress, optional): Gradio progress tracker for monitoring
|
37 |
generation progress. Defaults to gr.Progress(track_tqdm=True).
|
38 |
|
|
|
116 |
label="Steps",
|
117 |
minimum=1,
|
118 |
maximum=30,
|
119 |
+
value=20,
|
120 |
step=1
|
121 |
)
|
122 |
|