Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ unet = UNet2DConditionModel.from_pretrained(checkpoint_path, subfolder="
|
|
36 |
vae = AutoencoderKL.from_pretrained(checkpoint_path, subfolder="vae")
|
37 |
text_encoder = CLIPTextModel.from_pretrained(checkpoint_path, subfolder="text_encoder")
|
38 |
tokenizer = CLIPTokenizer.from_pretrained(checkpoint_path, subfolder="tokenizer")
|
39 |
-
scheduler = DDIMScheduler.from_pretrained(checkpoint_path, timestep_spacing=
|
40 |
pipe = MarigoldPipeline.from_pretrained(pretrained_model_name_or_path = checkpoint_path,
|
41 |
unet=unet,
|
42 |
vae=vae,
|
@@ -123,8 +123,7 @@ with gr.Blocks(css=css) as demo:
|
|
123 |
# Save the colored depth map
|
124 |
tmp_colored_depth = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
|
125 |
depth_colored.save(tmp_colored_depth.name)
|
126 |
-
|
127 |
-
print("Dummy predictions complete, returning results.")
|
128 |
return [(image, depth_colored), tmp_gray_depth.name, tmp_colored_depth.name]
|
129 |
|
130 |
# h, w = image.shape[:2]
|
|
|
36 |
vae = AutoencoderKL.from_pretrained(checkpoint_path, subfolder="vae")
|
37 |
text_encoder = CLIPTextModel.from_pretrained(checkpoint_path, subfolder="text_encoder")
|
38 |
tokenizer = CLIPTokenizer.from_pretrained(checkpoint_path, subfolder="tokenizer")
|
39 |
+
scheduler = DDIMScheduler.from_pretrained(checkpoint_path, timestep_spacing="trailing", subfolder="scheduler")
|
40 |
pipe = MarigoldPipeline.from_pretrained(pretrained_model_name_or_path = checkpoint_path,
|
41 |
unet=unet,
|
42 |
vae=vae,
|
|
|
123 |
# Save the colored depth map
|
124 |
tmp_colored_depth = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
|
125 |
depth_colored.save(tmp_colored_depth.name)
|
126 |
+
|
|
|
127 |
return [(image, depth_colored), tmp_gray_depth.name, tmp_colored_depth.name]
|
128 |
|
129 |
# h, w = image.shape[:2]
|