Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on 0% when generating #66

Open
haddad-github opened this issue Dec 16, 2024 · 3 comments
Open

Stuck on 0% when generating #66

haddad-github opened this issue Dec 16, 2024 · 3 comments

Comments

@haddad-github
Copy link

haddad-github commented Dec 16, 2024

In the first line, you can see the command that I'm using.

Loading the checkpoint shards works.

Then you see at the end it's at: 0% 0/40 [00:00<?, ?it/s]

It's been stuck like that with no progress for the past 20 minutes.

The Beautiful Soup warning shouldn't be an issue and the torch.meshgrid UserWarning is just a warning for a future release, so I don't see what is causing it to hang up.

Any ideas?

(env) C:\Users\XXXXX\Videos\LTX\LTX-Video>python inference.py --ckpt_path C:\Users\XXXXX\Videos\LTX\LTX-Video\model\ltx-video-2b-v0.9.safetensors --prompt "A beautiful sunset over the ocean" --height 512 --width 512 --num_frames 30 --seed 123

Running generation with arguments: Namespace(ckpt_path='C:\\Users\\XXXXX\\Videos\\LTX\\LTX-Video\\model\\ltx-video-2b-v0.9.safetensors', input_video_path=None, input_image_path=None, output_path=None, seed=123, num_inference_steps=40, num_images_per_prompt=1, guidance_scale=3, image_cond_noise_scale=0.15, height=512, width=512, num_frames=30, frame_rate=25, bfloat16=False, prompt='A beautiful sunset over the ocean', negative_prompt='worst quality, inconsistent motion, blurry, jittery, distorted')
Padded dimensions: 512x512x33
Downloading shards: 100%|███████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 499.95it/s]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:00<00:00,  3.87it/s]

Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:
`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.

Setting `clean_caption` to False...

Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:
`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.

Setting `clean_caption` to False...
  0%|                                                                                           | 0/40 [00:00<?, ?it/s]C:\Users\XXXXX\Videos\LTX\LTX-Video\env\Lib\site-packages\torch\functional.py:534: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3596.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]

Here are the versions I'm using:

CUDA version:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 566.14                 Driver Version: 566.14         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060 Ti   WDDM  |   00000000:01:00.0  On |                  N/A |
|  0%   45C    P8             25W /  200W |    2045MiB /   8192MiB |     11%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

Python version:

Python 3.12.7

PyTorch version:

2.5.1+cpu
@haddad-github
Copy link
Author

haddad-github commented Dec 16, 2024

UPDATE: I bypassed that particular issue by uninstalling my PyTorch installation and re-installing a particular version to use CUDA (instead of the 2.5.1 +cpu version I had) by following this:

pip uninstall torch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

However now I'm getting this issue, which I don't think is related, but I'll see if I can fix it:

torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 64.00 MiB. GPU 0 has a total capacity of 8.00 GiB of which 0 bytes is free. Of the allocated memory 22.17 GiB is allocated by PyTorch, and 355.16 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

@yunming181920
Copy link

Hi haddad, I think you should try to adjust the width,height or the frames so that there won't be an OOM. I successfully run the three jsons by this way. Also there is a chance that the vram of your 3060ti is too small to load the model.

@haddad-github
Copy link
Author

Hi haddad, I think you should try to adjust the width,height or the frames so that there won't be an OOM. I successfully run the three jsons by this way. Also there is a chance that the vram of your 3060ti is too small to load the model.

Hi Yun,

I ended up using ComfyUI with quantized models, which works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants