Spaces:
Sleeping
Sleeping
Bobby
commited on
Commit
·
f40aafb
1
Parent(s):
8991de8
scannet
Browse files
app.py
CHANGED
|
@@ -69,21 +69,11 @@ class Preprocessor:
|
|
| 69 |
|
| 70 |
torch.cuda.max_memory_allocated(device="cuda")
|
| 71 |
|
| 72 |
-
# # Controlnet Normal
|
| 73 |
-
# model_id = "lllyasviel/control_v11p_sd15_normalbae"
|
| 74 |
-
# print("initializing controlnet")
|
| 75 |
-
# controlnet = ControlNetModel.from_pretrained(
|
| 76 |
-
# model_id,
|
| 77 |
-
# torch_dtype=torch.float16,
|
| 78 |
-
# attn_implementation="flash_attention_2",
|
| 79 |
-
# ).to("cuda")
|
| 80 |
-
|
| 81 |
# Controlnet Normal
|
| 82 |
model_id = "lllyasviel/control_v11p_sd15_normalbae"
|
| 83 |
print("initializing controlnet")
|
| 84 |
-
controlnet_file = hf_hub_download(model_id, filename="diffusion_pytorch_model.safetensors")
|
| 85 |
controlnet = ControlNetModel.from_pretrained(
|
| 86 |
-
|
| 87 |
torch_dtype=torch.float16,
|
| 88 |
attn_implementation="flash_attention_2",
|
| 89 |
).to("cuda")
|
|
|
|
| 69 |
|
| 70 |
torch.cuda.max_memory_allocated(device="cuda")
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
# Controlnet Normal
|
| 73 |
model_id = "lllyasviel/control_v11p_sd15_normalbae"
|
| 74 |
print("initializing controlnet")
|
|
|
|
| 75 |
controlnet = ControlNetModel.from_pretrained(
|
| 76 |
+
model_id,
|
| 77 |
torch_dtype=torch.float16,
|
| 78 |
attn_implementation="flash_attention_2",
|
| 79 |
).to("cuda")
|