Rename controlnet path arg
This commit is contained in:
parent
ec8b42e521
commit
a942ca8d67
@ -108,7 +108,7 @@ class Flux1Controlnet:
|
|||||||
seed: int,
|
seed: int,
|
||||||
prompt: str,
|
prompt: str,
|
||||||
output: str,
|
output: str,
|
||||||
control_image_path: str,
|
controlnet_image_path: str,
|
||||||
controlnet_save_canny: bool = False,
|
controlnet_save_canny: bool = False,
|
||||||
config: ConfigControlnet = ConfigControlnet()
|
config: ConfigControlnet = ConfigControlnet()
|
||||||
) -> "GeneratedImage": # fmt: off
|
) -> "GeneratedImage": # fmt: off
|
||||||
@ -117,7 +117,7 @@ class Flux1Controlnet:
|
|||||||
time_steps = tqdm(range(config.num_inference_steps))
|
time_steps = tqdm(range(config.num_inference_steps))
|
||||||
|
|
||||||
# Embedd the controlnet reference image
|
# Embedd the controlnet reference image
|
||||||
control_image = ImageUtil.load_image(control_image_path)
|
control_image = ImageUtil.load_image(controlnet_image_path)
|
||||||
control_image = ControlnetUtil.scale_image(config.height, config.width, control_image)
|
control_image = ControlnetUtil.scale_image(config.height, config.width, control_image)
|
||||||
control_image = ControlnetUtil.preprocess_canny(control_image)
|
control_image = ControlnetUtil.preprocess_canny(control_image)
|
||||||
if controlnet_save_canny:
|
if controlnet_save_canny:
|
||||||
@ -180,7 +180,7 @@ class Flux1Controlnet:
|
|||||||
lora_paths=self.lora_paths,
|
lora_paths=self.lora_paths,
|
||||||
lora_scales=self.lora_scales,
|
lora_scales=self.lora_scales,
|
||||||
config=config,
|
config=config,
|
||||||
controlnet_image_path=control_image_path,
|
controlnet_image_path=controlnet_image_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@ -47,7 +47,7 @@ def main():
|
|||||||
seed=int(time.time()) if args.seed is None else args.seed,
|
seed=int(time.time()) if args.seed is None else args.seed,
|
||||||
prompt=args.prompt,
|
prompt=args.prompt,
|
||||||
output=args.output,
|
output=args.output,
|
||||||
control_image_path=args.controlnet_image_path,
|
controlnet_image_path=args.controlnet_image_path,
|
||||||
controlnet_save_canny=args.controlnet_save_canny,
|
controlnet_save_canny=args.controlnet_save_canny,
|
||||||
config=ConfigControlnet(
|
config=ConfigControlnet(
|
||||||
num_inference_steps=args.steps,
|
num_inference_steps=args.steps,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user