Skip to content

Commit

Permalink
webui's scimage is 0.20.0, so don't have multichannel
Browse files Browse the repository at this point in the history
fixes #808
  • Loading branch information
kabachuha committed Aug 16, 2023
1 parent e671d84 commit 083fc8d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/deforum_helpers/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
from skimage.exposure import match_histograms

def maintain_colors(prev_img, color_match_sample, mode):
skimage_version = pkg_resources.get_distribution('scikit-image').version
is_skimage_v20_or_higher = pkg_resources.parse_version(skimage_version) >= pkg_resources.parse_version('0.20.0')

match_histograms_kwargs = {'channel_axis': -1} if is_skimage_v20_or_higher else {'multichannel': True}
match_histograms_kwargs = {'channel_axis': -1}

if mode == 'RGB':
return match_histograms(prev_img, color_match_sample, **match_histograms_kwargs)
Expand Down

0 comments on commit 083fc8d

Please sign in to comment.