MCPcopy
hub / github.com/Lightricks/ComfyUI-LTXVideo / generate

Method generate

guide.py:101–137  ·  view source on GitHub ↗
(
        self,
        positive,
        negative,
        vae,
        latent,
        image,
        frame_idx,
        strength,
        crf,
        blur_radius,
        interpolation,
        crop,
    )

Source from the content-addressed store, hash-verified

99 )
100
101 def generate(
102 self,
103 positive,
104 negative,
105 vae,
106 latent,
107 image,
108 frame_idx,
109 strength,
110 crf,
111 blur_radius,
112 interpolation,
113 crop,
114 ):
115 _, width_scale_factor, height_scale_factor = vae.downscale_index_formula
116 width, height = (
117 latent["samples"].shape[4] * width_scale_factor,
118 latent["samples"].shape[3] * height_scale_factor,
119 )
120 image = (
121 comfy.utils.common_upscale(
122 image.movedim(-1, 1), width, height, interpolation, crop=crop
123 )
124 .movedim(1, -1)
125 .clamp(0, 1)
126 )
127 image = nodes_lt.LTXVPreprocess().execute(image, crf)[0]
128 image = blur_internal(image, blur_radius)
129 return nodes_lt.LTXVAddGuide().execute(
130 positive=positive,
131 negative=negative,
132 vae=vae,
133 latent=latent,
134 image=image,
135 frame_idx=frame_idx,
136 strength=strength,
137 )
138
139
140@comfy_node(name="LTXVImgToVideoAdvanced")

Callers

nothing calls this directly

Calls 2

blur_internalFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected