fix: Revert to Meshy Image-To-3D V1 and update models to meshy-4/meshy-3
Build and Deploy / build-and-push (push) Successful in 37s
Build and Deploy / build-and-push (push) Successful in 37s
This commit is contained in:
@@ -306,7 +306,7 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
||||
};
|
||||
|
||||
if (meshyModelType !== 'lowpoly') {
|
||||
payload.ai_model = meshyAiModel === 'latest' ? 'meshy-6' : meshyAiModel;
|
||||
payload.ai_model = meshyAiModel === 'latest' ? 'meshy-4' : meshyAiModel;
|
||||
payload.should_remesh = meshyShouldRemesh;
|
||||
if (meshyShouldRemesh) {
|
||||
payload.topology = meshyTopology;
|
||||
@@ -326,7 +326,7 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
||||
}
|
||||
}
|
||||
|
||||
const taskRes = await fetch('https://api.meshy.ai/openapi/v2/image-to-3d', {
|
||||
const taskRes = await fetch('https://api.meshy.ai/openapi/v1/image-to-3d', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -342,7 +342,7 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
||||
let isDone = false;
|
||||
while (!isDone) {
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
const pollRes = await fetch(`https://api.meshy.ai/openapi/v2/image-to-3d/${taskId}`, {
|
||||
const pollRes = await fetch(`https://api.meshy.ai/openapi/v1/image-to-3d/${taskId}`, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${meshyApiKey}`
|
||||
}
|
||||
@@ -494,9 +494,9 @@ export const ImageTo3DModal: React.FC<ImageTo3DModalProps> = ({ isOpen, onClose,
|
||||
<div className="flex flex-col gap-1">
|
||||
<label className="text-[10px] text-zinc-500 font-bold">AI Model</label>
|
||||
<select value={meshyAiModel} onChange={e => setMeshyAiModel(e.target.value)} disabled={meshyModelType === 'lowpoly'} className="bg-zinc-950 border border-zinc-800 rounded px-2 py-1.5 text-xs text-zinc-300 disabled:opacity-50">
|
||||
<option value="latest">Latest (Meshy 6)</option>
|
||||
<option value="meshy-6">Meshy 6</option>
|
||||
<option value="meshy-5">Meshy 5</option>
|
||||
<option value="latest">Latest (Meshy 4)</option>
|
||||
<option value="meshy-4">Meshy 4</option>
|
||||
<option value="meshy-3">Meshy 3</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user