fix LaMa node causing slow bug
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ class ImageShift:
|
||||
"image": ("IMAGE", ), #
|
||||
"shift_x": ("INT", {"default": 256, "min": -9999, "max": 9999, "step": 1}),
|
||||
"shift_y": ("INT", {"default": 256, "min": -9999, "max": 9999, "step": 1}),
|
||||
"cyclic": ("BOOLEAN", {"default": True}), # 反转mask#
|
||||
"cyclic": ("BOOLEAN", {"default": True}), # 是否循环重复
|
||||
"background_color": ("STRING", {"default": "#000000"}),
|
||||
"border_mask_width": ("INT", {"default": 20, "min": 0, "max": 999, "step": 1}),
|
||||
"border_mask_blur": ("INT", {"default": 12, "min": 0, "max": 999, "step": 1}),
|
||||
|
||||
+2
-2
@@ -1,9 +1,8 @@
|
||||
import os.path
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
from .imagefunc import *
|
||||
from iopaint import cli
|
||||
|
||||
|
||||
NODE_NAME = 'LaMa'
|
||||
|
||||
@@ -93,6 +92,7 @@ class LaMa:
|
||||
log(f"Error: {NODE_NAME} skipped, because unable to create temporary file.", message_type='error')
|
||||
return (image, )
|
||||
# process
|
||||
from iopaint import cli
|
||||
cli.run(model=lama_model, device=device, image=Path(image_dir), mask=Path(mask_dir), output=Path(result_dir))
|
||||
ret_image = check_image_file(os.path.join(result_dir, file_name), 500)
|
||||
shutil.rmtree(temp_dir)
|
||||
|
||||
Reference in New Issue
Block a user