Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,28 +34,20 @@ css = """
|
|
| 34 |
}
|
| 35 |
"""
|
| 36 |
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
checkpoint_path =
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
vae=vae,
|
| 48 |
-
scheduler=scheduler,
|
| 49 |
-
text_encoder=text_encoder,
|
| 50 |
-
tokenizer=tokenizer,
|
| 51 |
-
variant=variant,
|
| 52 |
-
torch_dtype=dtype,
|
| 53 |
-
)
|
| 54 |
pipe = pipe.to(DEVICE)
|
| 55 |
pipe.unet.eval()
|
| 56 |
|
| 57 |
-
|
| 58 |
-
title = "# End-to-End Fine-Tuned Marigold for Depth Estimation"
|
| 59 |
description = """ Please refer to our [paper](https://arxiv.org/abs/2409.11355) and [GitHub](https://vision.rwth-aachen.de/diffusion-e2e-ft) for more details."""
|
| 60 |
|
| 61 |
@spaces.GPU
|
|
|
|
| 34 |
}
|
| 35 |
"""
|
| 36 |
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 37 |
+
vae = AutoencoderKL.from_pretrained(checkpoint_path, subfolder='vae')
|
| 38 |
+
scheduler = DDIMScheduler.from_pretrained(checkpoint_path, timestep_spacing="trailing", subfolder='scheduler')
|
| 39 |
+
image_encoder = CLIPVisionModelWithProjection.from_pretrained(checkpoint_path, subfolder="image_encoder")
|
| 40 |
+
feature_extractor = CLIPImageProcessor.from_pretrained(checkpoint_path, subfolder="feature_extractor")
|
| 41 |
+
unet = UNet2DConditionModel.from_pretrained(checkpoint_path, subfolder="unet")
|
| 42 |
+
pipe = DepthNormalEstimationPipeline(vae=vae,
|
| 43 |
+
image_encoder=image_encoder,
|
| 44 |
+
feature_extractor=feature_extractor,
|
| 45 |
+
unet=unet,
|
| 46 |
+
scheduler=scheduler)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
pipe = pipe.to(DEVICE)
|
| 48 |
pipe.unet.eval()
|
| 49 |
|
| 50 |
+
title = "# End-to-End Fine-Tuned GeoWizard"
|
|
|
|
| 51 |
description = """ Please refer to our [paper](https://arxiv.org/abs/2409.11355) and [GitHub](https://vision.rwth-aachen.de/diffusion-e2e-ft) for more details."""
|
| 52 |
|
| 53 |
@spaces.GPU
|