Spaces:
Running
on
Zero
Running
on
Zero
MohamedRashad
commited on
Commit
•
339482d
1
Parent(s):
641afde
chore: Remove commented out code and unused parameters in img2img_infer function
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ pipeline = AutoPipelineForImage2Image.from_pretrained("black-forest-labs/FLUX.1-
|
|
14 |
pipeline.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipeline)
|
15 |
|
16 |
lora_ids = {
|
17 |
-
"Realism": "XLabs-AI/flux-RealismLora",
|
18 |
"Cartoonism": "aleksa-codes/flux-ghibsky-illustration",
|
19 |
}
|
20 |
|
@@ -71,11 +71,12 @@ def img2img_infer(image_path, image_description):
|
|
71 |
width, height = pil_image.size
|
72 |
for enhanced_image in pipeline.flux_pipe_call_that_returns_an_iterable_of_images(
|
73 |
prompt=f'GHIBSKY style, {image_description}',
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
79 |
output_type="pil",
|
80 |
):
|
81 |
yield enhanced_image.resize((width, height))
|
|
|
14 |
pipeline.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipeline)
|
15 |
|
16 |
lora_ids = {
|
17 |
+
# "Realism": "XLabs-AI/flux-RealismLora",
|
18 |
"Cartoonism": "aleksa-codes/flux-ghibsky-illustration",
|
19 |
}
|
20 |
|
|
|
71 |
width, height = pil_image.size
|
72 |
for enhanced_image in pipeline.flux_pipe_call_that_returns_an_iterable_of_images(
|
73 |
prompt=f'GHIBSKY style, {image_description}',
|
74 |
+
image=pil_image,
|
75 |
+
# guidance_scale=3.5,
|
76 |
+
# num_inference_steps=28,
|
77 |
+
# width=1024,
|
78 |
+
# height=1024,
|
79 |
+
# generator=torch.Generator("cpu").manual_seed(0),
|
80 |
output_type="pil",
|
81 |
):
|
82 |
yield enhanced_image.resize((width, height))
|