Unexpected Output While Generating a 3D Model Using Zhengyi/LLaMA-Mesh

#5
by orha - opened

Hi everyone,

I recently used the Zhengyi/LLaMA-Mesh model to generate a 3D model of a fire extinguisher, but the results were unexpected. Instead of a coherent mesh, I got an odd mesh like this:

image.png

Generated OBJ:

https://0x0.st/8-ht.obj

The format resembles a 3D mesh structure (vertices and faces), but rendering it produced no meaningful object. Adjusting the prompt or cleaning the data didn’t help much.

Code:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "Zhengyi/LLaMA-Mesh"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto")

prompt = "Generate a 3D model of a fire extinguisher."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=3000)
mesh_data = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(mesh_data)

Sign up or log in to comment