Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,13 +24,13 @@ from huggingface_hub import hf_hub_download
|
|
24 |
# pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
|
25 |
# model = model.cuda()
|
26 |
# ddim_sampler = DDIMSampler(model)
|
27 |
-
model = create_model('./models/cldm_v21_512_latctrl_coltrans.yaml')
|
28 |
ckpt = hf_hub_download(repo_id="xywwww/scene_diffusion", filename="checkpoints/epoch=25-step=112553.ckpt")
|
29 |
model.load_state_dict(load_state_dict(ckpt), strict=False)
|
30 |
model = model.cuda()
|
31 |
ddim_sampler = DDIMSampler(model)
|
32 |
|
33 |
-
|
34 |
def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, ddim_steps, guess_mode, strength, scale, seed, eta, low_threshold, high_threshold):
|
35 |
with torch.no_grad():
|
36 |
img = resize_image(HWC3(input_image), image_resolution)
|
|
|
24 |
# pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
|
25 |
# model = model.cuda()
|
26 |
# ddim_sampler = DDIMSampler(model)
|
27 |
+
model = create_model('./models/cldm_v21_512_latctrl_coltrans.yaml')
|
28 |
ckpt = hf_hub_download(repo_id="xywwww/scene_diffusion", filename="checkpoints/epoch=25-step=112553.ckpt")
|
29 |
model.load_state_dict(load_state_dict(ckpt), strict=False)
|
30 |
model = model.cuda()
|
31 |
ddim_sampler = DDIMSampler(model)
|
32 |
|
33 |
+
@spaces.GPU
|
34 |
def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, ddim_steps, guess_mode, strength, scale, seed, eta, low_threshold, high_threshold):
|
35 |
with torch.no_grad():
|
36 |
img = resize_image(HWC3(input_image), image_resolution)
|