Tencent Hunyuan 3D-2
Model Information
Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.
"\"mesh_url\":\"https://storage.googleapis.com/1019uploads/t_2_3d_c0f9d952417b41b398e91d6f4e506c0d.glb\""
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": "tencent-hunyuan-3d-2","version": "Hunyuan3D-DiT-v2-0-Fast","input": {"seed": 1234,"guidance_scale": 5.5,"octree_resolution": 256,"remove_background": false,"inference_steps": 20,"shape_only": false,"prompt": "your prompt here","task": "text-to-3d"}})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: ~300 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Tencent's Hunyuan 3D-2 is an advanced AI model designed to generate high-resolution 3D assets from textual or image inputs. It supports both text-to-3D and image-to-3D tasks, enabling users to create detailed 3D models efficiently.
Technical Specifications
Architecture: Hunyuan 3D-2 utilizes large-scale diffusion models to generate high-resolution 3D assets. The Tencent Hunyuan 3D-2 has been optimized to reduce inference time while maintaining quality, achieving a balance between speed and detail.
Performance: The Tencent Hunyuan 3D-2 achieves a CLIP score of 0.809, surpassing both open-source and proprietary alternatives. It introduces significant improvements in texture synthesis and geometric accuracy, outperforming existing solutions across standard industry metrics.
Key Considerations
Input Quality: The quality of the generated 3D model is heavily influenced by the clarity and detail of the input prompt or image. Ensure inputs are well-prepared to achieve the best results.
Output Formats: The generated 3D models are typically output in formats compatible with standard 3D software. Verify that the output format aligns with your intended use case.
Legal Information for Tencent Hunyuan 3D-2
By using this Tencent Hunyuan 3D-2, you agree to:
- Tencent Privacy
- Tencent SERVICE AGREEMENT
Tips & Tricks
- Prompt:
- For text-to-3D: Use specific and detailed descriptions, including attributes like size, shape, material, and context. For example, "A medieval wooden bridge over a flowing river with stone pillars."
- For image-to-3D: Ensure the image has a transparent background and clearly depicts the subject to facilitate accurate 3D reconstruction.
- Task:
- Select 'text-to-3D' when providing a textual description as input.
- Select 'image-to-3D' when using an image as the input source.
- Shape Only:
- Enable this option if you require only the geometric structure of the Tencent Hunyuan 3D-2 without textures. This is beneficial for applications focusing on form rather than appearance.
- Inference Steps:
- Set the inference steps between 20 to 50 based on the desired detail level and available computational resources. Higher steps result in more detailed models but require more processing time.
Capabilities
- Rapid Prototyping: Quickly generate 3D models for concept visualization in design and development processes.
- Educational Purposes: Aid in teaching 3D modeling concepts by providing quick examples based on textual or image descriptions.
- Creative Projects: Assist artists and creators in developing 3D assets for various media, including games and animations.
What can I use for?
Rapid Prototyping: Quickly generate 3D models for concept visualization in design and development processes.
Educational Purposes: Aid in teaching 3D modeling concepts by providing quick examples based on textual or image descriptions.
Creative Projects: Assist artists and creators in developing 3D assets for various media, including games and animations.
Virtual Reality & Augmented Reality: Generate 3D models that can be used in immersive VR and AR experiences.
3D Printing: Produce models with optimized geometric structures suitable for 3D printing.
Digital Content Creation: Enhance storytelling, film production, and other digital media projects by generating unique 3D assets.
Things to be aware of
Experiment with Prompts: Test various levels of detail in your textual descriptions to see how the Tencent Hunyuan 3D-2 interprets and generates different 3D structures.
Vary Inference Steps: Adjust the inference steps to find a balance between processing time and model detail that suits your project's needs.
Shape Only Mode: Generate models in 'Shape Only' mode to focus on geometry, which can be useful for applications like 3D printing or further custom texturing.
Limitations
Complexity Handling: Extremely complex scenes or highly detailed inputs may challenge the Tencent Hunyuan 3D-2's capacity, leading to less accurate representations.
Texture Generation: While the Tencent Hunyuan 3D-2 excels in texture synthesis, certain intricate textures may not be perfectly replicated.
Output Format: GLB