Skip to content

Commit

Permalink
fix controlnet input_mode ENUM
Browse files Browse the repository at this point in the history
  • Loading branch information
burgalon committed Feb 29, 2024
1 parent b59deaa commit 715f9c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions-builtin/sd_forge_controlnet/scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def get_input_data(self, p, unit, preprocessor, h, w):
image_list = []
resize_mode = external_code.resize_mode_from_value(unit.resize_mode)

if unit.input_mode == external_code.InputMode.MERGE:
if unit.input_mode == external_code.InputMode.MERGE.value:
for idx, item in enumerate(unit.batch_input_gallery):
img_path = item['name']
logger.info(f'Try to read image: {img_path}')
Expand All @@ -169,7 +169,7 @@ def get_input_data(self, p, unit, preprocessor, h, w):
mask = np.ascontiguousarray(cv2.imread(mask_path)[:, :, ::-1]).copy()
if img is not None:
image_list.append([img, mask])
elif unit.input_mode == external_code.InputMode.BATCH:
elif unit.input_mode == external_code.InputMode.BATCH.value:
image_list = []
image_extensions = ['.jpg', '.jpeg', '.png', '.bmp']
batch_image_files = shared.listfiles(unit.batch_image_dir)
Expand Down

0 comments on commit 715f9c8

Please sign in to comment.