MCPcopy
hub / github.com/KlingAIResearch/ReCamMaster / __init__

Method __init__

train_recammaster.py:129–138  ·  view source on GitHub ↗
(self, text_encoder_path, vae_path, image_encoder_path=None, tiled=False, tile_size=(34, 34), tile_stride=(18, 16))

Source from the content-addressed store, hash-verified

127
128class LightningModelForDataProcess(pl.LightningModule):
129 def __init__(self, text_encoder_path, vae_path, image_encoder_path=None, tiled=False, tile_size=(34, 34), tile_stride=(18, 16)):
130 super().__init__()
131 model_path = [text_encoder_path, vae_path]
132 if image_encoder_path is not None:
133 model_path.append(image_encoder_path)
134 model_manager = ModelManager(torch_dtype=torch.bfloat16, device="cpu")
135 model_manager.load_models(model_path)
136 self.pipe = WanVideoReCamMasterPipeline.from_model_manager(model_manager)
137
138 self.tiler_kwargs = {"tiled": tiled, "tile_size": tile_size, "tile_stride": tile_stride}
139
140 def test_step(self, batch, batch_idx):
141 text, video, path = batch["text"][0], batch["video"], batch["path"][0]

Callers

nothing calls this directly

Calls 4

load_modelsMethod · 0.95
ModelManagerClass · 0.90
__init__Method · 0.45
from_model_managerMethod · 0.45

Tested by

no test coverage detected