Files
olivv-cs-ComfyUI-FunPack/__init__.py
T
digital-garbageandClaude Opus 4.8 c2c9be6ce8 Remove the Scene Builder (Studio/Refiner) entirely
Deletes the FunPack Scene Builder node and the Studio Scene Builder feature
— the per-key scene database (scene_db / universal_memory / saved scenes),
the Studio "Scene" tab, scene-phrase authority over classification, and the
scene-database wildcard cleanup. It was redundant: helpful on paper but
effectively unused, undrivable from the Cutting Room, and a risk to shortcuts.

Removed:
- node registration (__init__.py, funpack.py) + web/funpack_scene_builder.js
- templates.py: scene-DB storage layer (load/save/normalize/empty_scene_db,
  SCENE_DB_VERSION/SCENE_STATE_FIELD/SCENE_CATEGORY_SOURCES, scene_store_path),
  all scene_* helpers, resolve_scene_database_wildcards, the FunPackSceneBuilder
  class, and the /funpack/scenes* routes
- conditioning.py: _v2_scene_builder_db / _v2_scene_memory_item /
  _v2_apply_scene_builder_authority / _v2_scene_builder_category_for_entry /
  _v2_sync_scene_builder_memory / _v2_resolve_scene_builder_wildcards (+ wildcard
  helpers + _v2_scene_key), the scene_db threading through classify/learning,
  the scene_category_locked phrase fields + their training branch, the
  state["scene_builder"] preservation, and the Studio scene_builder prompt mode
- web/funpack_studio.js: Scene tab, SB_MODES, scene_builder settings, renderScene,
  fetch/saveScene, the Session Scene-Builder section, and the Refiner banner/notice
- tests/test_scene_builder.py (whole file) + scene-builder tests in
  test_v2_category_alignment.py; the SceneBuilder example workflow + its doc;
  README link; Scene Builder mentions in docs/FunPackStudio.md

Kept intact: shortcuts (apply_prompt_shortcuts / shortcut DB), transitions and
the canonical split_scenes splitter, and FunPackRefinementKeyLoader. Studio now
always uses the connected positive_prompt. No new test failures (the 16/97
remaining in tests/ are pre-existing env/sampler failures); movie_editor 140 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 22:31:31 +03:00

133 lines
5.5 KiB
Python

# ComfyUI-FunPack/__init__.py
if __package__:
from .conditioning import (
FunPackAdvisorLLM,
FunPackConditioningAdjust,
FunPackLorebookEnhancer,
FunPackPromptCombiner,
FunPackPromptEnhancer,
FunPackSaveRefinementLatent,
FunPackStoryWriter,
FunPackStudio,
FunPackVideoRefinerV2,
)
from .image_processing import (
FunPackClipVisionOutputCombine,
FunPackContinueVideo,
FunPackStoryMemKeyframeExtractor,
FunPackStoryMemLastFrameExtractor,
FunPackVideoStitch,
)
from .model_management import FunPackApplyLoraWeights, FunPackLoraLoader
from .samplers import FunPackHybridEuler2SSampler, FunPackDistilledFlowSampler, FunPackNormalizingSampler, FunPackLTXAVSceneChainSampler
from .templates import FunPackRefinementKeyLoader
try:
from . import batch_training # noqa: F401 registers /funpack/batch/* routes
except Exception as _e:
print(f"[FunPack] batch_training routes unavailable: {_e}")
try:
from .movie_editor import server as _movie_editor_server # noqa: F401 registers /funpack/movie/* routes
except Exception as _e:
print(f"[FunPack] Movie Editor routes unavailable: {_e}")
else:
# Standalone tests may not have the full ComfyUI/CUDA runtime loaded.
from conditioning import (
FunPackAdvisorLLM,
FunPackConditioningAdjust,
FunPackLorebookEnhancer,
FunPackPromptCombiner,
FunPackPromptEnhancer,
FunPackSaveRefinementLatent,
FunPackStoryWriter,
FunPackStudio,
FunPackVideoRefinerV2,
)
try:
from image_processing import (
FunPackClipVisionOutputCombine,
FunPackContinueVideo,
FunPackStoryMemKeyframeExtractor,
FunPackStoryMemLastFrameExtractor,
FunPackVideoStitch,
)
except Exception:
FunPackClipVisionOutputCombine = None
FunPackContinueVideo = None
FunPackStoryMemKeyframeExtractor = None
FunPackStoryMemLastFrameExtractor = None
FunPackVideoStitch = None
try:
from model_management import FunPackApplyLoraWeights, FunPackLoraLoader
except Exception:
FunPackApplyLoraWeights = None
FunPackLoraLoader = None
try:
from samplers import FunPackHybridEuler2SSampler, FunPackDistilledFlowSampler, FunPackNormalizingSampler, FunPackLTXAVSceneChainSampler
except Exception:
FunPackHybridEuler2SSampler = None
FunPackDistilledFlowSampler = None
FunPackNormalizingSampler = None
FunPackLTXAVSceneChainSampler = None
try:
from templates import FunPackRefinementKeyLoader
except Exception:
FunPackRefinementKeyLoader = None
WEB_DIRECTORY = "./web"
NODE_CLASS_MAPPINGS = {
"FunPackAdvisorLLM": FunPackAdvisorLLM,
"FunPackConditioningAdjust": FunPackConditioningAdjust,
"FunPackStudio": FunPackStudio,
"FunPackPromptCombiner": FunPackPromptCombiner,
"FunPackStoryMemKeyframeExtractor": FunPackStoryMemKeyframeExtractor,
"FunPackStoryMemLastFrameExtractor": FunPackStoryMemLastFrameExtractor,
"FunPackPromptEnhancer": FunPackPromptEnhancer,
"FunPackStoryWriter": FunPackStoryWriter,
"FunPackVideoStitch": FunPackVideoStitch,
"FunPackClipVisionOutputCombine": FunPackClipVisionOutputCombine,
"FunPackContinueVideo": FunPackContinueVideo,
"FunPackLorebookEnhancer": FunPackLorebookEnhancer,
"FunPackVideoRefinerV2": FunPackVideoRefinerV2,
"FunPackSaveRefinementLatent": FunPackSaveRefinementLatent,
"FunPackHybridEuler2SSampler": FunPackHybridEuler2SSampler,
"FunPackDistilledFlowSampler": FunPackDistilledFlowSampler,
"FunPackNormalizingSampler": FunPackNormalizingSampler,
"FunPackLTXAVSceneChainSampler": FunPackLTXAVSceneChainSampler,
"FunPackApplyLoraWeights": FunPackApplyLoraWeights,
"FunPackLoraLoader": FunPackLoraLoader,
"FunPackRefinementKeyLoader": FunPackRefinementKeyLoader,
}
NODE_CLASS_MAPPINGS = {name: cls for name, cls in NODE_CLASS_MAPPINGS.items() if cls is not None}
NODE_DISPLAY_NAME_MAPPINGS = {
"FunPackAdvisorLLM": "FunPack Advisor LLM",
"FunPackConditioningAdjust": "FunPack Conditioning Adjust",
"FunPackStudio": "FunPack Studio",
"FunPackPromptCombiner": "FunPack Prompt Combiner",
"FunPackStoryMemKeyframeExtractor": "FunPack StoryMem Keyframe Extractor",
"FunPackStoryMemLastFrameExtractor": "FunPack StoryMem Last Frame Extractor",
"FunPackPromptEnhancer": "FunPack Prompt Enhancer (Standalone)",
"FunPackStoryWriter": "FunPack Story Writer",
"FunPackVideoStitch": "FunPack Video Stitch",
"FunPackClipVisionOutputCombine": "FunPack CLIP Vision Output Combine",
"FunPackContinueVideo": "FunPack Continue Video",
"FunPackLorebookEnhancer": "FunPack Lorebook Enhancer",
"FunPackVideoRefinerV2": "FunPack Video Refiner V2",
"FunPackSaveRefinementLatent": "FunPack Save Refinement Latent",
"FunPackHybridEuler2SSampler": "FunPack Hybrid Euler 2S Sampler",
"FunPackDistilledFlowSampler": "FunPack Distilled Flow Sampler",
"FunPackNormalizingSampler": "FunPack Normalizing Sampler",
"FunPackLTXAVSceneChainSampler": "FunPack LTXAV Scene Chain Sampler",
"FunPackApplyLoraWeights": "FunPack Apply LoRA Weights",
"FunPackLoraLoader": "FunPack LoRA Loader",
"FunPackRefinementKeyLoader": "FunPack Refinement Key Loader",
}
__all__ = [
"NODE_CLASS_MAPPINGS",
"NODE_DISPLAY_NAME_MAPPINGS",
"WEB_DIRECTORY",
]