MCPcopy Index your code
hub / github.com/vladmandic/sdnext / validate_pipeline

Function validate_pipeline

modules/processing_diffusers.py:552–570  ·  view source on GitHub ↗
(p: processing.StableDiffusionProcessing)

Source from the content-addressed store, hash-verified

550
551
552def validate_pipeline(p: processing.StableDiffusionProcessing):
553 from modules.video_models.models_def import models as video_models
554 models_cls = []
555 for family in video_models:
556 for m in video_models[family]:
557 if m.repo_cls is not None:
558 models_cls.append(m.repo_cls.__name__)
559 if m.custom is not None:
560 models_cls.append(m.custom)
561 is_video_model = shared.sd_model.__class__.__name__ in models_cls
562 override_video_pipelines = ['WanPipeline', 'WanImageToVideoPipeline', 'WanVACEPipeline']
563 is_video_pipeline = ('video' in p.__class__.__name__.lower()) or (shared.sd_model.__class__.__name__ in override_video_pipelines)
564 if is_video_model and not is_video_pipeline:
565 log.error(f'Mismatch: type={shared.sd_model_type} cls={shared.sd_model.__class__.__name__} request={p.__class__.__name__} video model with non-video pipeline')
566 return False
567 elif not is_video_model and is_video_pipeline:
568 log.error(f'Mismatch: type={shared.sd_model_type} cls={shared.sd_model.__class__.__name__} request={p.__class__.__name__} non-video model with video pipeline')
569 return False
570 return True
571
572
573def process_diffusers(p: processing.StableDiffusionProcessing):

Callers 1

process_diffusersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected