From e1fe3cf5101780b806b811b1044cdceded1704be Mon Sep 17 00:00:00 2001 From: Bigad Soleiman Date: Tue, 3 Dec 2024 18:17:37 +0000 Subject: [PATCH] Add # nosec B311 for random image/video seed --- .../idefics/functions/request-handler/adapters/nova.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/model-interfaces/idefics/functions/request-handler/adapters/nova.py b/lib/model-interfaces/idefics/functions/request-handler/adapters/nova.py index 7812bc95..544a3e71 100644 --- a/lib/model-interfaces/idefics/functions/request-handler/adapters/nova.py +++ b/lib/model-interfaces/idefics/functions/request-handler/adapters/nova.py @@ -169,7 +169,7 @@ def generate_image( "width": 1280, "height": 768, "cfgScale": 7.0, - "seed": model_kwargs.get("seed", randint(0, 2147483646)), + "seed": model_kwargs.get("seed", randint(0, 2147483646)), # nosec B311 }, } logger.info( @@ -236,7 +236,7 @@ def generate_video( "durationSeconds": 6, "fps": 24, "dimension": "1280x720", - "seed": model_kwargs.get("seed", randint(0, 2147483646)), + "seed": model_kwargs.get("seed", randint(0, 2147483646)), # nosec B311 }, } logger.info("Model input", model_input=model_input)