Mochi-1
mochi-1
Mochi 1 preview is an open state-of-the-art video generation model with high-fidelity motion and strong prompt adherence in a preliminary evaluation.
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": "mochi-1","version": "0.0.1","input": {"fps": "30","seed": null,"prompt": "Close-up of a chameleon's eye, with its scaly skin changing color. Ultra high resolution 4k.","num_frames": "163","guidance_scale": "6","image_prompt_strength": "0.1"}})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: ~261 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Mochi-1 is a state-of-the-art text-to-video generation model designed to create high-quality, dynamic videos from textual descriptions. By leveraging advanced machine learning techniques, it bridges the gap between creativity and technology, enabling users to transform their imagination into seamless, visually appealing video outputs.
Technical Specifications
- Mochi-1 Video Generation: Converts text prompts into video sequences with smooth transitions and high-quality visuals.
- Adaptive Scaling: Ensures outputs are consistent across various frame rates and resolutions.
- Input Flexibility: Accepts detailed parameter configurations to provide users with extensive control over video characteristics.
- Seed Control: Reproducibility through seed values enables consistent outputs for the same parameter settings.
Key Considerations
- Frame Count Limitations: Mochi-1 supports a range of 30-170 frames. Exceeding these limits may result in errors or degraded performance.
- Frame Rate (FPS): Set between 10-60 FPS for smooth playback. Higher FPS values require additional computational power.
- Guidance Scale: Ranges from 1 to 10, controlling the adherence to the textual prompt. Extreme values may reduce output quality.
- Prompt Strength: Adjusted between 0-1, impacting the influence of image-based prompts relative to text.
- Seed Consistency: The seed value determines output reproducibility. Keep it consistent for identical results across runs.
Tips & Tricks
- Optimal Frame Count (num_frames):
- Use 30-70 for short, concise clips.
- Set 100-150 for extended, detailed sequences.
- Avoid the maximum (170) unless necessary, as it may increase generation time significantly.
- Image Prompt Strength (image_prompt_strength):
- Set 0.3-0.5 for balanced text and image influence.
- Use higher values (0.6-0.8) for image-dominant outputs.
- Avoid 1 unless text input is minimal, as it may overpower the text prompt.
- Guidance Scale (guidance_scale):
- Use 3-5 for natural and balanced outputs.
- Set 6-8 for stronger alignment with text prompts.
- Avoid extreme values (1 or 10) as they may reduce coherence.
- Frame Rate (fps):
- Use 24-30 for cinematic quality.
- Set 40-50 for dynamic or fast-paced visuals.
- Avoid 60 FPS unless necessary for specific use cases, as it increases computational load.
- Seed (seed):
- Use a fixed value for reproducibility.
Capabilities
- Text-to-Video: Mochi-1 converts descriptive text into high-quality video clips.
- Customizable Parameters: Provides extensive control over frame count, prompt strength, FPS, and more.
- Reproducibility: Seed control enables consistent outputs for the same configuration.
- Dynamic Visuals: Smooth transitions and coherent sequences.
What can I use for?
- Creative Projects: Mochi-1 generates videos for storytelling, marketing, and design.
- Prototyping: Rapidly visualize concepts or ideas.
- Education: Create visual aids and demonstrations.
- Entertainment: Produce visually appealing clips for social media or personal use.
Things to be aware of
- Creative Storytelling: Use vivid and imaginative prompts to craft compelling narratives.
- Dynamic Compositions: Experiment with various FPS and frame counts to suit different styles.
- Prompt Strength Balance: Adjust the image and text prompt strengths for hybrid inspirations.
- Reproducibility: Use a fixed seed to iterate on a consistent baseline.
Limitations
- Prompt Sensitivity: Ambiguous or overly complex prompts may result in inconsistent outputs.
- Balance Challenge: Finding the ideal parameter configuration may require multiple iterations.
- Output Consistency: While seeds ensure reproducibility, varying parameter combinations may lead to unexpected results.
Output Format: MP4