Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,6 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
| 13 |
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16).to("cuda")
|
| 14 |
|
| 15 |
seed=42
|
| 16 |
-
randomize_seed=False
|
| 17 |
guidance_scale=2.5
|
| 18 |
steps=28,
|
| 19 |
|
|
@@ -34,10 +33,7 @@ def infer(input_image, prompt, progress=gr.Progress(track_tqdm=True)):
|
|
| 34 |
tuple: A 2-tuple containing:
|
| 35 |
- tuple of (PIL.Image.Image, PIL.Image.Image): The original image, generated/edited image
|
| 36 |
- int: The seed value used for generation (useful when randomize_seed=True)
|
| 37 |
-
"""
|
| 38 |
-
if randomize_seed:
|
| 39 |
-
seed = random.randint(0, MAX_SEED)
|
| 40 |
-
|
| 41 |
if input_image:
|
| 42 |
input_image = input_image.convert("RGB")
|
| 43 |
image = pipe(
|
|
|
|
| 13 |
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16).to("cuda")
|
| 14 |
|
| 15 |
seed=42
|
|
|
|
| 16 |
guidance_scale=2.5
|
| 17 |
steps=28,
|
| 18 |
|
|
|
|
| 33 |
tuple: A 2-tuple containing:
|
| 34 |
- tuple of (PIL.Image.Image, PIL.Image.Image): The original image, generated/edited image
|
| 35 |
- int: The seed value used for generation (useful when randomize_seed=True)
|
| 36 |
+
"""
|
|
|
|
|
|
|
|
|
|
| 37 |
if input_image:
|
| 38 |
input_image = input_image.convert("RGB")
|
| 39 |
image = pipe(
|