| 16 | |
| 17 | @comfy_node(name="LTXAddVideoICLoRAGuide") |
| 18 | class LTXAddVideoICLoRAGuide(io.ComfyNode): |
| 19 | PATCHIFIER = nodes_lt.SymmetricPatchifier(1, start_end=True) |
| 20 | |
| 21 | @classmethod |
| 22 | def define_schema(cls): |
| 23 | return io.Schema( |
| 24 | node_id="LTXAddVideoICLoRAGuide", |
| 25 | display_name=NODES_DISPLAY_NAME_PREFIX + " Add Video IC-LoRA Guide", |
| 26 | category="Lightricks/IC-LoRA", |
| 27 | description=( |
| 28 | "Adds one or more conditioning frames starting at the specified frame index. " |
| 29 | "Supports both single images and multi-frame videos. " |
| 30 | "The latent_downscale_factor resizes input to a fraction of the target size " |
| 31 | "(1 = original, 2 = half, 3 = third, etc.) for IC-LoRA on small grids." |
| 32 | ), |
| 33 | inputs=[ |
| 34 | io.Conditioning.Input("positive"), |
| 35 | io.Conditioning.Input("negative"), |
| 36 | io.Vae.Input("vae"), |
| 37 | io.Latent.Input( |
| 38 | "latent", |
| 39 | tooltip="Video-only latent to condition. Must be a 5D video latent (batch, channels, frames, height, width).", |
| 40 | ), |
| 41 | io.Image.Input("image"), |
| 42 | io.Int.Input( |
| 43 | "frame_idx", |
| 44 | default=0, |
| 45 | min=-9999, |
| 46 | max=9999, |
| 47 | tooltip=( |
| 48 | "Frame index to start the conditioning at. " |
| 49 | "For single-frame videos, any frame_idx value is acceptable. " |
| 50 | "For videos, frame_idx must be 1 modulo 8, otherwise it will be rounded " |
| 51 | "down to the nearest 1 modulo 8. Negative values are counted from the end of the video." |
| 52 | ), |
| 53 | ), |
| 54 | io.Float.Input( |
| 55 | "strength", |
| 56 | default=1.0, |
| 57 | min=0.0, |
| 58 | max=1.0, |
| 59 | step=0.01, |
| 60 | ), |
| 61 | io.Float.Input( |
| 62 | "latent_downscale_factor", |
| 63 | default=1.0, |
| 64 | min=1.0, |
| 65 | max=10.0, |
| 66 | step=1.0, |
| 67 | tooltip="For IC-LoRA on small grid. 1 means original size, 2 means half size, 3 means third, etc.", |
| 68 | ), |
| 69 | io.Combo.Input( |
| 70 | "crop", |
| 71 | options=["disabled", "center"], |
| 72 | default="disabled", |
| 73 | tooltip="Crop mode when resizing. 'center' crops to fit, 'disabled' stretches to fit.", |
| 74 | ), |
| 75 | io.Boolean.Input( |
nothing calls this directly
no outgoing calls
no test coverage detected