Skip to content

Commit

Permalink
HOTFIX v0.2.2
Browse files Browse the repository at this point in the history
adds matplotlib to requirements
checks responses back for None type images
  • Loading branch information
CreativeBuilds committed Oct 6, 2023
1 parent 2131539 commit 3e377b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.2.2
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
imagehash
matplotlib
4 changes: 4 additions & 0 deletions validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 3e377b5

Please sign in to comment.