Skip to content

Commit e6b8f1f

Browse files
bug fix (#81)
1 parent 0187f87 commit e6b8f1f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

diffsynth_engine/tools/flux_outpainting_tool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from diffsynth_engine import fetch_model, FluxControlNet, ControlNetParams, FluxImagePipeline
2-
from typing import List, Tuple, Optional
2+
from typing import List, Tuple, Optional, Callable
33
from PIL import Image
44
import torch
55

@@ -34,6 +34,7 @@ def __call__(
3434
inpainting_scale: float = 0.9,
3535
seed: int = 42,
3636
num_inference_steps: int = 20,
37+
progress_callback: Optional[Callable] = None,
3738
):
3839
assert scaling_factor >= 1.0, "scale must be >= 1.0"
3940
width, height = image.width, image.height
@@ -57,4 +58,5 @@ def __call__(
5758
mask=mask,
5859
scale=inpainting_scale,
5960
),
61+
progress_callback=progress_callback,
6062
)

diffsynth_engine/tools/flux_replace_tool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from diffsynth_engine import ControlNetParams, FluxControlNet, FluxImagePipeline, FluxRedux, fetch_model
2-
from typing import List, Tuple, Optional
2+
from typing import List, Tuple, Optional, Callable
33
from PIL import Image
44
import torch
55

@@ -45,6 +45,7 @@ def __call__(
4545
ref_scale: float = 1.0,
4646
seed: int = 42,
4747
num_inference_steps: int = 20,
48+
progress_callback: Optional[Callable] = None,
4849
):
4950
assert image.size == mask.size
5051
self.pipe.redux.set_scale(ref_scale)
@@ -68,5 +69,6 @@ def __call__(
6869
mask=mask,
6970
scale=inpainting_scale,
7071
),
72+
progress_callback=progress_callback,
7173
)
7274
return result.resize((width, height))

0 commit comments

Comments
 (0)