Masrkai commited on
Commit
a40e9f6
·
verified ·
1 Parent(s): b380e5c

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +6 -2
model.py CHANGED
@@ -7,10 +7,14 @@ from io import BytesIO
7
 
8
  def load_pipeline():
9
  """
10
- Load the stable-zero123 model pipeline from Hugging Face.
11
  """
12
  ckpt_id = "dylanebert/LGM-full"
13
- pipe = DiffusionPipeline.from_pretrained(ckpt_id, torch_dtype=torch.float32).to("cpu")
 
 
 
 
14
  return pipe
15
 
16
  def generate_3d_model(pipe, prompt, output_path="output.obj", guidance_scale=7.5, num_inference_steps=32):
 
7
 
8
  def load_pipeline():
9
  """
10
+ Load the LGM-full model pipeline from Hugging Face with remote code execution enabled.
11
  """
12
  ckpt_id = "dylanebert/LGM-full"
13
+ pipe = DiffusionPipeline.from_pretrained(
14
+ ckpt_id,
15
+ torch_dtype=torch.float32,
16
+ trust_remote_code=True # Enable remote code execution for custom model code
17
+ ).to("cpu")
18
  return pipe
19
 
20
  def generate_3d_model(pipe, prompt, output_path="output.obj", guidance_scale=7.5, num_inference_steps=32):