Spaces:
Runtime error
Runtime error
Commit
·
f786e98
1
Parent(s):
f080dac
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ model_arch = "zoe"
|
|
| 18 |
# Inpainting pipeline
|
| 19 |
|
| 20 |
|
| 21 |
-
unet = UNet2DConditionModel.from_pretrained("pablodawson/ldm3d-inpainting", cache_dir="cache", subfolder="unet"
|
| 22 |
pipe = StableDiffusionLDM3DInpaintPipeline.from_pretrained("Intel/ldm3d-4c", cache_dir="cache" ).to(device)
|
| 23 |
|
| 24 |
# Depth estimation
|
|
@@ -74,7 +74,7 @@ elif model_arch == "zoe":
|
|
| 74 |
|
| 75 |
return Image.fromarray(output_.astype("int32")), output.min(), output.max()
|
| 76 |
|
| 77 |
-
def denormalize(image,
|
| 78 |
image = (image / 65535 - 1 ) * (min - max) + min
|
| 79 |
return image
|
| 80 |
|
|
|
|
| 18 |
# Inpainting pipeline
|
| 19 |
|
| 20 |
|
| 21 |
+
unet = UNet2DConditionModel.from_pretrained("pablodawson/ldm3d-inpainting", cache_dir="cache", subfolder="unet")
|
| 22 |
pipe = StableDiffusionLDM3DInpaintPipeline.from_pretrained("Intel/ldm3d-4c", cache_dir="cache" ).to(device)
|
| 23 |
|
| 24 |
# Depth estimation
|
|
|
|
| 74 |
|
| 75 |
return Image.fromarray(output_.astype("int32")), output.min(), output.max()
|
| 76 |
|
| 77 |
+
def denormalize(image, min, max):
|
| 78 |
image = (image / 65535 - 1 ) * (min - max) + min
|
| 79 |
return image
|
| 80 |
|