Carlos s
commited on
Upload pipeline_ltx_video.py
Browse files- pipeline_ltx_video.py +17 -2
pipeline_ltx_video.py
CHANGED
|
@@ -24,6 +24,15 @@ from transformers import (
|
|
| 24 |
AutoTokenizer,
|
| 25 |
)
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
from ltx_video.models.autoencoders.causal_video_autoencoder import (
|
| 28 |
CausalVideoAutoencoder,
|
| 29 |
)
|
|
@@ -45,7 +54,8 @@ from ltx_video.models.autoencoders.vae_encode import (
|
|
| 45 |
)
|
| 46 |
|
| 47 |
|
| 48 |
-
logger = logging.
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
ASPECT_RATIO_1024_BIN = {
|
|
@@ -923,6 +933,9 @@ class LTXVideoPipeline(DiffusionPipeline):
|
|
| 923 |
latent_height,
|
| 924 |
latent_width,
|
| 925 |
)
|
|
|
|
|
|
|
|
|
|
| 926 |
|
| 927 |
# Prepare the list of denoising time-steps
|
| 928 |
|
|
@@ -971,7 +984,7 @@ class LTXVideoPipeline(DiffusionPipeline):
|
|
| 971 |
# Cria um mapeamento de identidade seguro.
|
| 972 |
guidance_mapping = list(range(len(timesteps)))
|
| 973 |
|
| 974 |
-
|
| 975 |
|
| 976 |
# here `guidance_scale` is defined analog to the guidance weight `w` of equation (2)
|
| 977 |
# of the Imagen paper: https://arxiv.org/pdf/2205.11487.pdf . `guidance_scale = 1`
|
|
@@ -1088,6 +1101,8 @@ class LTXVideoPipeline(DiffusionPipeline):
|
|
| 1088 |
generator=generator,
|
| 1089 |
vae_per_channel_normalize=vae_per_channel_normalize,
|
| 1090 |
)
|
|
|
|
|
|
|
| 1091 |
|
| 1092 |
# Update the latents with the conditioning items and patchify them into (b, n, c)
|
| 1093 |
latents, pixel_coords, conditioning_mask, num_cond_latents = (
|
|
|
|
| 24 |
AutoTokenizer,
|
| 25 |
)
|
| 26 |
|
| 27 |
+
|
| 28 |
+
from huggingface_hub import logging
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
logging.set_verbosity_error()
|
| 32 |
+
logging.set_verbosity_warning()
|
| 33 |
+
logging.set_verbosity_info()
|
| 34 |
+
logging.set_verbosity_debug()
|
| 35 |
+
|
| 36 |
from ltx_video.models.autoencoders.causal_video_autoencoder import (
|
| 37 |
CausalVideoAutoencoder,
|
| 38 |
)
|
|
|
|
| 54 |
)
|
| 55 |
|
| 56 |
|
| 57 |
+
logger = logging.getlogger(__name__)
|
| 58 |
+
|
| 59 |
|
| 60 |
|
| 61 |
ASPECT_RATIO_1024_BIN = {
|
|
|
|
| 933 |
latent_height,
|
| 934 |
latent_width,
|
| 935 |
)
|
| 936 |
+
|
| 937 |
+
print(f"[ltxxxxxxxx] latent_shape {latent_shape.shplape}")
|
| 938 |
+
|
| 939 |
|
| 940 |
# Prepare the list of denoising time-steps
|
| 941 |
|
|
|
|
| 984 |
# Cria um mapeamento de identidade seguro.
|
| 985 |
guidance_mapping = list(range(len(timesteps)))
|
| 986 |
|
| 987 |
+
print(f"[ltxxxxxxxx] guidance_mapping {guidance_mapping}")
|
| 988 |
|
| 989 |
# here `guidance_scale` is defined analog to the guidance weight `w` of equation (2)
|
| 990 |
# of the Imagen paper: https://arxiv.org/pdf/2205.11487.pdf . `guidance_scale = 1`
|
|
|
|
| 1101 |
generator=generator,
|
| 1102 |
vae_per_channel_normalize=vae_per_channel_normalize,
|
| 1103 |
)
|
| 1104 |
+
|
| 1105 |
+
|
| 1106 |
|
| 1107 |
# Update the latents with the conditioning items and patchify them into (b, n, c)
|
| 1108 |
latents, pixel_coords, conditioning_mask, num_cond_latents = (
|