Video Crafter
video-crafter
Video Crafter is open diffusion model for high-quality video generation
Model Information
Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.
Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "video-crafter","version": "0.0.1","input": {"fps": "28","seed": null,"steps": "50","width": "1024","height": "576","prompt": "your prompt here"}})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~192 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Video Crafter is a state-of-the-art generative model designed to create high-quality videos based on text prompts and customizable parameters. With its intuitive structure and advanced algorithms, it enables users to produce tailored video outputs efficiently. Video Crafter supports various input configurations, providing users with flexibility and control over video generation.
Technical Specifications
- Generative Model: Advanced video synthesis using cutting-edge AI techniques.
- Customization: Allows users to fine-tune width, height, and frame rates for tailored outputs.
- Reproducibility: Incorporates seed functionality to replicate results effectively.
- Output Quality: Governed by steps, where higher values yield better detail at the cost of longer generation times.
Key Considerations
Input Compatibility:
- Ensure all parameters align with your system's capabilities to avoid errors or suboptimal results.
Performance Trade-offs:
- Higher resolution and step count can significantly increase generation time and resource consumption.
Reproducibility:
- Minor changes in prompts or parameters can lead to drastically different results. Document settings for consistency.
Output Length:
- While the model doesn’t limit duration explicitly, parameter configurations like fps and steps directly impact perceived length and smoothness.
Tips & Tricks
Prompt for Video Crafter:
- Create descriptive and vivid prompts. For example:
- Poor: “A city.”
- Better: “A futuristic cityscape at sunset with flying cars.”
- Avoid redundancy or overly long descriptions that dilute focus.
Width & Height:
- Recommended aspect ratios:
- Landscape: Use a higher width than height (e.g., 1920x1080).
- Portrait: Height > Width (e.g., 1080x1920).
- Square: Equal width and height (e.g., 1080x1080).
- For optimal performance, ensure width and height are divisible by 64 to align with model requirements.
Steps for Video Crafter:
- Low steps (10-25): Fast generation, lower quality.
- Medium steps (30-50): Balanced quality and speed.
- High steps (50+): Superior quality, but longer rendering times.
FPS:
- 15 fps: Suitable for slower, artistic visuals.
- 24 fps: Standard for cinematic quality.
- 30 fps+: Ideal for smooth, high-quality videos.
Seed:
- Use a fixed seed to replicate successful results.
- For creative exploration, randomize seeds to discover new variations.
Capabilities
Dynamic Content Creation: Generate videos tailored to specific prompts and visual styles with Video Crafter.
Customizable Output: Adjust resolution, smoothness, and steps to match artistic or functional needs.
Reproducibility: Ensure consistent outputs for similar input configurations.
Creative Exploration: Experiment with diverse styles and variations using adjustable parameters.
What can I use for?
Media Production:
- Quickly generate storyboards or conceptual animations for films or ads.
Artistic Projects:
- Create unique video art based on detailed textual descriptions.
Educational Content:
- Produce illustrative videos for training or instructional materials.
Marketing Campaigns:
- Design engaging and personalized video advertisements.
Things to be aware of
Generate a futuristic landscape with dynamic lighting by adjusting the steps and seed values with Video Crafter.
Experiment with artistic frame rates (e.g., 15 fps) to create surreal animations.
Combine multiple prompts to produce a storyboard-like sequence.
Explore the impact of aspect ratio by switching between landscape, portrait, and square dimensions.
Limitations
Resource-Intensive:
- Generating high-resolution videos with high step counts requires significant computational power.
Output Diversity:
- While robust, outputs may occasionally deviate from the intended prompt or exhibit artifacts, especially with complex or abstract descriptions.
Output Format: MP4