Welcome to Jetson AGX Orin repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
04.Image to animation
Image to Animation
Image to Animation1. Function Introduction2. Hardware Connection and Setup3. Code Analysis4. Running the Code5. Experimental Results
1. Function Introduction
This example program can generate a 5-second animation from a single image.
2. Hardware Connection and Setup
This example program requires not only a power adapter but also a DP monitor, mouse, and keyboard for displaying the interface and operation.
3. Code Analysis
Source code path:
/home/jetson/showing/animation/animation.py
If you need to replace the image, please replace the image in the path ~/ComfyUI/input/image.jpg.

If you need to modify the prompt message, you can modify the PROMPT variable.
xxxxxxxxxxTEXT_PROMPT = '''The background is a cyberpunk-style Tang Dynasty Never Sleeping City, with flying eaves and holographic lanterns. The camera slowly zooms in and circles around. The image shows a robotic dog, and a person is slowly waving a yellow bone in front of it. The robotic dog follows the bone's sway, and the movements are natural and seamless, with a smooth transition between real and virtual elements. \nConstraint:\nDo not change the robotic dog's appearance.'''
If you need to change the output file name, modify the OUTPUT_NAME variable. The final output will be in the ~/ComfyUI/output/video/ directory.
xxxxxxxxxxOUTPUT_NAME = "myvideo"
If you need to change the ComfyUI port, modify the value of the self.comfyui_server variable.
xxxxxxxxxxself.comfyui_server = '127.0.0.1:8188'
4. Running the Code
Open a new system terminal and start the ComfyUI service.
xxxxxxxxxxcd ~/ComfyUIsource venv/bin/activatepython main.py


Open another new system terminal, start the virtual environment, and start the main program for telling stories.
xxxxxxxxxxcd ~/showing/source venvs/bin/activatecd animation/python animation.py

5. Experimental Results
After the program starts, it will call a large model file to render the animation. The program will take a relatively long time to run; the default configuration takes about 16 minutes.

When the progress bar reaches 100%, it indicates completion.

After the animation is generated, the MP4 video file is stored in the ~/ComfyUI/output/video/ directory.
