The editor moves from /funpack/movie/ to /funpack/, taking its API to /funpack/api/*. The frontend needed no change — api.js already derives its base from the page's own path. /funpack/movie/ and /funpack/easy/ redirect there; they are registered before the static catch-all, which would otherwise swallow them, and after the /funpack/refinement_keys and /funpack/batch routes, which still win by registration order. Deletes hub.py and the easy_gen package: the hub picked between two apps that are now one, and every Easy Gen frontend file was either a duplicate of an editor file or a second way to do something the editor already does. window.FunPackAppName went with them, so the three gates that read it — models.js, sampler_panel.js, onboarding.js — now read the mode instead, live rather than once at load. The wizard drops its second host table.
132 lines
5.2 KiB
Python
132 lines
5.2 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, 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/* routes
|
|
except Exception as _e:
|
|
print(f"[FunPack] FunPack UI 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, FunPackLTXAVSceneChainSampler
|
|
except Exception:
|
|
FunPackHybridEuler2SSampler = None
|
|
FunPackDistilledFlowSampler = 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,
|
|
|
|
"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",
|
|
|
|
"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",
|
|
]
|