Compare commits

...

6 Commits

Author SHA1 Message Date
anilrafucha222-dev
c56c3d6ae2
Merge 608d98e833 into ae487cc653 2026-01-10 17:01:43 +03:00
Yuxuan BIAN
ae487cc653
Add Wan2.1-related community project Video-As-Prompt (#561)
Co-authored-by: Shiwei Zhang <134917139+Steven-SWZhang@users.noreply.github.com>
2025-12-16 00:18:50 +08:00
Shiwei Zhang
854bd88e7f
update README 2025-12-15 17:03:42 +08:00
Yang Yong (雍洋)
8177ee5bc6
Add LightX2V Community Works (#558)
* Add LightX2V Community Works

* update

* update

* update
2025-12-15 16:59:29 +08:00
Shalfun
f134d60bcc
Update README.md (#487)
an open driving world model based on WAN!

Co-authored-by: Shiwei Zhang <134917139+Steven-SWZhang@users.noreply.github.com>
2025-12-15 11:51:44 +08:00
google-labs-jules[bot]
608d98e833 feat: Add command-line calculator tool
This change adds a new command-line calculator tool. The tool can perform basic arithmetic operations (add, subtract, multiply, divide) and is invoked from the command line. It includes a full suite of unit tests.
2025-11-03 20:07:36 +00:00
3 changed files with 69 additions and 0 deletions

View File

@ -36,6 +36,9 @@ In this repository, we present **Wan2.1**, a comprehensive and open suite of vid
## Community Works
If your work has improved **Wan2.1** and you would like more people to see it, please inform us.
- [Video-As-Prompt](https://github.com/bytedance/Video-As-Prompt), the first unified semantic-controlled video generation model based on **Wan2.1-14B-I2V** with a Mixture-of-Transformers architecture and in-context controls (e.g., concept, style, motion, camera). Refer to the [project page](https://bytedance.github.io/Video-As-Prompt/) for more examples.
- [LightX2V](https://github.com/ModelTC/LightX2V), a lightweight and efficient video generation framework that integrates **Wan2.1** and **Wan2.2**, supports multiple engineering acceleration techniques for fast inference, which can run on RTX 5090 and RTX 4060 (8GB VRAM).
- [DriVerse](https://github.com/shalfun/DriVerse), an autonomous driving world model based on **Wan2.1-14B-I2V**, generates future driving videos conditioned on any scene frame and given trajectory. Refer to the [project page](https://github.com/shalfun/DriVerse/tree/main) for more examples.
- [Training-Free-WAN-Editing](https://github.com/KyujinHan/Awesome-Training-Free-WAN2.1-Editing), built on **Wan2.1-T2V-1.3B**, allows training-free video editing with image-based training-free methods, such as [FlowEdit](https://arxiv.org/abs/2412.08629) and [FlowAlign](https://arxiv.org/abs/2505.23145).
- [Wan-Move](https://github.com/ali-vilab/Wan-Move), accepted to NeurIPS 2025, a framework that brings **Wan2.1-I2V-14B** to SOTA fine-grained, point-level motion control! Refer to [their project page](https://wan-move.github.io/) for more information.
- [EchoShot](https://github.com/JoHnneyWang/EchoShot), a native multi-shot portrait video generation model based on **Wan2.1-T2V-1.3B**, allows generation of multiple video clips featuring the same character as well as highly flexible content controllability. Refer to [their project page](https://johnneywang.github.io/EchoShot-webpage/) for more information.

37
calculator.py Normal file
View File

@ -0,0 +1,37 @@
import argparse
def add(x, y):
"""Adds two numbers together."""
return x + y
def subtract(x, y):
"""Subtracts two numbers."""
return x - y
def multiply(x, y):
"""Multiplies two numbers."""
return x * y
def divide(x, y):
"""Divides two numbers."""
if y == 0:
raise ValueError("Cannot divide by zero.")
return x / y
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A simple command-line calculator.")
parser.add_argument("x", type=float, help="The first number.")
parser.add_argument("operation", choices=["+", "-", "*", "/"], help="The operation to perform.")
parser.add_argument("y", type=float, help="The second number.")
args = parser.parse_args()
if args.operation == "+":
result = add(args.x, args.y)
elif args.operation == "-":
result = subtract(args.x, args.y)
elif args.operation == "*":
result = multiply(args.x, args.y)
elif args.operation == "/":
result = divide(args.x, args.y)
print(f"Result: {result}")

29
test_calculator.py Normal file
View File

@ -0,0 +1,29 @@
import unittest
from calculator import add, subtract, multiply, divide
class TestCalculator(unittest.TestCase):
def test_add(self):
self.assertEqual(add(2, 3), 5)
self.assertEqual(add(-1, 1), 0)
self.assertEqual(add(-1, -1), -2)
def test_subtract(self):
self.assertEqual(subtract(3, 2), 1)
self.assertEqual(subtract(-1, 1), -2)
self.assertEqual(subtract(-1, -1), 0)
def test_multiply(self):
self.assertEqual(multiply(2, 3), 6)
self.assertEqual(multiply(-1, 1), -1)
self.assertEqual(multiply(-1, -1), 1)
def test_divide(self):
self.assertEqual(divide(6, 3), 2)
self.assertEqual(divide(-1, 1), -1)
self.assertEqual(divide(-1, -1), 1)
with self.assertRaises(ValueError):
divide(1, 0)
if __name__ == '__main__':
unittest.main()