mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-24 04:04:29 +08:00
Update nodes.py
This commit is contained in:
parent
01a770df51
commit
85724229f4
7
nodes.py
7
nodes.py
@ -4777,6 +4777,7 @@ class MaskOrImageToWeight:
|
|||||||
[
|
[
|
||||||
'list',
|
'list',
|
||||||
'list of lists',
|
'list of lists',
|
||||||
|
'pandas series',
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
"default": 'list'
|
"default": 'list'
|
||||||
@ -4813,6 +4814,12 @@ and returns it as a float value.
|
|||||||
return mean_values,
|
return mean_values,
|
||||||
elif output_type == 'list of lists':
|
elif output_type == 'list of lists':
|
||||||
return [[value] for value in mean_values],
|
return [[value] for value in mean_values],
|
||||||
|
elif output_type == 'pandas series':
|
||||||
|
try:
|
||||||
|
import pandas as pd
|
||||||
|
except:
|
||||||
|
raise Exception("MaskOrImageToWeight: pandas is not installed. Please install pandas to use this output_type")
|
||||||
|
return pd.Series(mean_values),
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unsupported output_type: {output_type}")
|
raise ValueError(f"Unsupported output_type: {output_type}")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user