Skip to content

Commit

Permalink
Update ImageGoNord/GoNord.py
Browse files Browse the repository at this point in the history
Co-authored-by: GabrielePuliti <[email protected]>
  • Loading branch information
TheJoin95 and Wabri authored Apr 16, 2024
1 parent 4b348ea commit 024f3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ImageGoNord/GoNord.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def convert_image_by_model(self, image, use_model_cpu=False):
try:
pal_np = np.array(palette).reshape(1,6,3)/255
except:
print("You have too many colors in your palette for the model. Auto reducing the array. It's limited at 6 colors, now you have: ", len(palette))
print("You have too many colors in your palette for the model, this feature is limited to 6 colours, now you have: ", len(palette), "! I'll take the first 6!")
pal_np = np.array(palette[0:6]).reshape(1,6,3)/255

pal = torch.Tensor((convertor.rgb2lab(pal_np) - [50,0,0] ) / [50,128,128]).unsqueeze(0)
Expand Down

0 comments on commit 024f3b9

Please sign in to comment.