Spaces:
Build error
Build error
gradio_app/custom_models/normal_prediction.py
CHANGED
|
@@ -7,9 +7,9 @@ from scripts.all_typing import *
|
|
| 7 |
|
| 8 |
training_config = "gradio_app/custom_models/image2normal.yaml"
|
| 9 |
checkpoint_path = "ckpt/image2normal/unet_state_dict.pth"
|
|
|
|
| 10 |
|
| 11 |
-
def predict_normals(image: List[Image.Image], guidance_scale=2., do_rotate=True, num_inference_steps=30, **kwargs):
|
| 12 |
-
trainer, pipeline = load_pipeline(training_config, checkpoint_path)
|
| 13 |
pipeline.enable_model_cpu_offload()
|
| 14 |
|
| 15 |
img_list = image if isinstance(image, list) else [image]
|
|
|
|
| 7 |
|
| 8 |
training_config = "gradio_app/custom_models/image2normal.yaml"
|
| 9 |
checkpoint_path = "ckpt/image2normal/unet_state_dict.pth"
|
| 10 |
+
trainer, pipeline = load_pipeline(training_config, checkpoint_path)
|
| 11 |
|
| 12 |
+
def predict_normals(image: List[Image.Image], guidance_scale=2., do_rotate=True, num_inference_steps=30, **kwargs):
|
|
|
|
| 13 |
pipeline.enable_model_cpu_offload()
|
| 14 |
|
| 15 |
img_list = image if isinstance(image, list) else [image]
|