| 2 | |
| 3 | |
| 4 | class AddLatentGuideNode(nodes_lt.LTXVAddGuide): |
| 5 | @classmethod |
| 6 | def INPUT_TYPES(s): |
| 7 | return { |
| 8 | "required": { |
| 9 | "model": ("MODEL",), |
| 10 | "latent": ("LATENT",), |
| 11 | "image_latent": ("LATENT",), |
| 12 | "index": ("INT", {"default": 0, "min": -1, "max": 9999, "step": 1}), |
| 13 | "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0}), |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | RETURN_TYPES = ("MODEL", "LATENT") |
| 18 | RETURN_NAMES = ("model", "latent") |
| 19 | |
| 20 | CATEGORY = "ltxtricks" |
| 21 | FUNCTION = "generate" |
| 22 | |
| 23 | def generate(self, model, latent, image_latent, index, strength): |
| 24 | noise_mask = nodes_lt.get_noise_mask(latent) |
| 25 | latent = latent["samples"] |
| 26 | |
| 27 | image_latent = image_latent["samples"] |
| 28 | |
| 29 | latent, noise_mask = self.replace_latent_frames( |
| 30 | latent, |
| 31 | noise_mask, |
| 32 | image_latent, |
| 33 | index, |
| 34 | strength, |
| 35 | ) |
| 36 | |
| 37 | return ( |
| 38 | model, |
| 39 | {"samples": latent, "noise_mask": noise_mask}, |
| 40 | ) |
nothing calls this directly
no outgoing calls
no test coverage detected