Fixed loading of deleted node
This commit is contained in:
+12
-13
@@ -17,9 +17,9 @@ from PIL import Image
|
||||
import folder_paths
|
||||
from comfy.utils import ProgressBar
|
||||
import comfy.clip_vision
|
||||
import math
|
||||
|
||||
# Constants from StoryMem
|
||||
import math
|
||||
|
||||
# Constants from StoryMem
|
||||
IMAGE_FACTOR = 28
|
||||
VIDEO_MIN_PIXELS = 48 * IMAGE_FACTOR * IMAGE_FACTOR # 37,632
|
||||
MIN_FRAME_SIMILARITY = 0.9
|
||||
@@ -253,8 +253,8 @@ class FunPackContinueVideo:
|
||||
raise ValueError(f"Cannot extract {frame_count} frames from video with only {total_frames} frames.")
|
||||
|
||||
continued = images[-frame_count:]
|
||||
return (continued,)
|
||||
|
||||
return (continued,)
|
||||
|
||||
class FunPackStoryMemKeyframeExtractor:
|
||||
"""
|
||||
Extracts keyframes from video frames using:
|
||||
@@ -610,26 +610,25 @@ class FunPackStoryMemLastFrameExtractor:
|
||||
last_frame = frames[-1:]
|
||||
motion_frames = frames[-n_frames:]
|
||||
|
||||
return (last_frame, motion_frames)
|
||||
return (last_frame, motion_frames)
|
||||
|
||||
|
||||
# Update NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"FunPackStoryMemKeyframeExtractor": FunPackStoryMemKeyframeExtractor,
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"FunPackStoryMemKeyframeExtractor": FunPackStoryMemKeyframeExtractor,
|
||||
"FunPackStoryMemLastFrameExtractor": FunPackStoryMemLastFrameExtractor,
|
||||
"FunPackImg2LatentInterpolation": FunPackImg2LatentInterpolation,
|
||||
"FunPackCLIPLoader": FunPackCLIPLoader,
|
||||
"FunPackPromptEnhancer": FunPackPromptEnhancer,
|
||||
"FunPackVideoStitch": FunPackVideoStitch,
|
||||
"FunPackContinueVideo": FunPackContinueVideo,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"FunPackStoryMemKeyframeExtractor": "FunPack StoryMem Keyframe Extractor",
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"FunPackStoryMemKeyframeExtractor": "FunPack StoryMem Keyframe Extractor",
|
||||
"FunPackStoryMemLastFrameExtractor": "FunPack StoryMem Last Frame Extractor",
|
||||
"FunPackImg2LatentInterpolation": "FunPack Img2Latent Interpolation",
|
||||
"FunPackCLIPLoader": "FunPack CLIP Loader",
|
||||
"FunPackPromptEnhancer": "FunPack Prompt Enhancer (Standalone)",
|
||||
"FunPackVideoStitch": "FunPack Video Stitch",
|
||||
"FunPackContinueVideo": "FunPack Continue Video"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user