diff --git a/VERSION b/VERSION index 7dff5b8..f477849 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.1 \ No newline at end of file +0.2.2 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5662298..4eae7ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,5 @@ fabric @ git+https://github.com/sd-fabric/fabric.git omegaconf image-reward clip @ git+https://github.com/openai/CLIP.git -imagehash \ No newline at end of file +imagehash +matplotlib \ No newline at end of file diff --git a/validator.py b/validator.py index 3a7a424..c92664c 100644 --- a/validator.py +++ b/validator.py @@ -425,6 +425,10 @@ async def main(): if not config.validator.allow_nsfw: for i, response in enumerate(responses): + # delete all none images + for j, image in enumerate(response.images): + if image is None: + del responses[i].images[j] if len(response.images) == 0: continue clip_input = processor([bt.Tensor.deserialize(image) for image in response.images], return_tensors="pt").to( DEVICE )