CogVideo icon indicating copy to clipboard operation
CogVideo copied to clipboard

咨询cogvideox1.5训练和推理框架支持现状

Open wmm-coding opened this issue 1 year ago • 5 comments

System Info / 系統信息

作者您好,看到很多issue里有提到,sat框架后续会弃用,想明确知道当前sat框架和diffusers框架的一个功能支持现状

  1. sat框架是否支持CogVideoX1.5的微调?①支持1.5微调但是新模型即将弃用所以不推荐(对1.5版本没影响);②功能不支持所以不推荐;③代码不完善,微调效果不保证所以不推荐(影响1.5版本)
  2. diffusers框架是否支持CogVideoX1.5的训练?①支持单卡训练 ②支持单卡和多卡训练 ③开发中,即将支持
  3. sat框架是否支持CogVideoX1.5的推理?①支持但是新模型即将弃用所以不推荐(对1.5版本没影响);②代码不完善,推理效果不保证所以不推荐(影响1.5版本)

Information / 问题信息

  • [X] The official example scripts / 官方的示例脚本
  • [ ] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

参考sat目录下的readme进行微调和推理 参考diffusers框架进行微调和推理

Expected behavior / 期待表现

咨询:

  1. sat框架是否支持CogVideoX1.5的微调?①支持1.5微调但是新模型即将弃用所以不推荐(对1.5版本没影响);②功能不支持所以不推荐;③代码不完善,微调效果不保证所以不推荐(影响1.5版本)
  2. diffusers框架是否支持CogVideoX1.5的训练?①支持单卡训练 ②支持单卡和多卡训练 ③开发中,即将支持
  3. sat框架是否支持CogVideoX1.5的推理?①支持但是新模型即将弃用所以不推荐(对1.5版本没影响);②代码不完善,推理效果不保证所以不推荐(影响1.5版本)

想明确知道sat框架对CogVideoX1.5的训练和推理功能支持是否完善,弃用sat框架在当前1.5版本就会弃用还是更高版本才会弃用

wmm-coding avatar Dec 26 '24 02:12 wmm-coding

Hello, we tried to solve the issue.

This is what we did:

Update the SAT README.md file to address the questions about CogVideoX1.5 support in SAT and Diffusers frameworks. Clarify the current status of fine-tuning and inference support for CogVideoX1.5 in both frameworks.

You can review changes in this commit: jacks-sam1010@361438d.

thanks

wmm-coding avatar Dec 26 '24 02:12 wmm-coding

我更新了一版基于cogvideo 1.5的lora微调代码,主要用于支持bucket训练并解决了cogvideo1.5位置编码和pfs 编码报错的问题 以下是我的代码https://github.com/Passenger12138/CogVideoX-5B-I2V-v1.5-lora-train.git

Passenger12138 avatar Dec 26 '24 12:12 Passenger12138

🚀 We are excited to release the LoRA fine-tuning code for CogVideoX 1.5 by Diffusers, designed specifically for image-to-video (image2video) tasks! This update brings significant improvements and new features to elevate your training experience. The full training startup code can be found in the finetune folder. Here's what's new:

🔥 Key Features & Improvements:

  1. 💥 Bucket-based Multi-Resolution Training: Unlock unparalleled model adaptability and performance across videos of all resolutions. This groundbreaking feature boosts the model’s ability to handle diverse video qualities with ease!

  2. ⚡ Fixed RoPE (Relative Position Encoding) Configuration Error: We’ve optimized the position encoding mechanism, solving the error in the original CogVideo code, resulting in smoother training and higher-quality outputs. No more misconfigurations—just pure efficiency!

  3. 🔧 Corrected OFS Embedding Issue: Previously, OFS embedding was incorrectly set to None in the original code. Now, it’s properly configured for stability and precision, improving the overall reliability and robustness of the model.

✅ Summary of Fixes:

  • Multi-resolution Support 🖼️
  • Accurate Positional Encoding 📍
  • Correct OFS Embedding Setup 🔑
  • Optimized Multi-GPU Fine-Tuning 💻

With these changes, you can now start training with just one command—simple, fast, and effective!

🔗 Dive into the code and elevate your projects:
https://github.com/Passenger12138/CogVideoX-5B-I2V-v1.5-lora-train/tree/main/finetune

🚀 我们激动地宣布发布了基于 Diffusers 的 LoRA 微调代码,用于 CogVideoX 1.5,并支持图像到视频(image2video)任务! 本次更新带来了重大的改进和新特性,训练启动代码可以在 finetune 文件夹中找到。以下是主要的新功能:

🔥 关键功能与改进:

  1. 💥 基于桶的多分辨率训练:释放前所未有的模型适应性和性能,适用于各种分辨率的视频。此项突破性功能增强了模型对不同视频质量的处理能力!

  2. ⚡ 修复了 RoPE(相对位置编码)配置错误:我们优化了位置编码机制,解决了原始 CogVideo 代码中的错误,从而提高了训练效率和输出质量。不再有配置错误——只剩下高效训练!

  3. 🔧 解决了 OFS 嵌入设置为 None 的问题:原始代码中,OFS 嵌入错误地设置为 None。现在它已经正确配置,提升了模型的稳定性和可靠性,确保了模型的精准性。

修复汇总:

  • 多分辨率支持 🖼️
  • 准确的位置编码 📍
  • 正确的 OFS 嵌入设置 🔑
  • 优化的多卡微调 💻

通过这些改进,您现在只需一条命令就能开始训练——简单、快速、有效!

🔗 立即体验我们的代码,提升您的项目:
https://github.com/Passenger12138/CogVideoX-5B-I2V-v1.5-lora-train/tree/main/finetune

Information / 问题信息

  • [ ] The official example scripts / 官方的示例脚本
  • [X] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

🔗 Dive into the code and elevate your projects:
https://github.com/Passenger12138/CogVideoX-5B-I2V-v1.5-lora-train/tree/main/finetune

Expected behavior / 期待表现

🔗 Dive into the code and elevate your projects:
https://github.com/Passenger12138/CogVideoX-5B-I2V-v1.5-lora-train/tree/main/finetune

Passenger12138 avatar Dec 26 '24 12:12 Passenger12138

@Passenger12138 您好,我依旧想确认下如下两点,原因是我们已经投入不少工作在基于sat框架训练1.5

  1. sat框架是否支持CogVideoX1.5的微调?①支持1.5微调但是新模型即将弃用所以不推荐(对1.5版本没影响);②功能不支持所以不推荐;③代码不完善,微调效果不保证所以不推荐(影响1.5版本)
  2. sat框架是否支持CogVideoX1.5的推理?①支持但是新模型即将弃用所以不推荐(对1.5版本没影响);②代码不完善,推理效果不保证所以不推荐(影响1.5版本)

例如像您最新提到的原始 CogVideo 代码中的位置编码错误等,是否会在sat框架同步修复?若不修复是不是意味着影响1.5版本

wmm-coding avatar Dec 26 '24 13:12 wmm-coding

  1. 不支持 会影响到1.5版本,现在的sat版本不改动难以训练1.5版本。优先级很低,现有的人手都在维护diffusers版本的模型。
  2. 现在的sat框架支持1.5的推理

zRzRzRzRzRzRzR avatar Jan 12 '25 07:01 zRzRzRzRzRzRzR