root
commited on
Commit
·
ded978f
1
Parent(s):
ece27cf
trying
Browse files- handler.py +2 -1
- requirements.txt +4 -4
handler.py
CHANGED
|
@@ -50,7 +50,8 @@ class EndpointHandler():
|
|
| 50 |
pretrained_base_model_path_unet = os.path.join(base_dir, 'pretrained_weights', 'stable-diffusion-v1-5', 'unet')
|
| 51 |
print("model path is " + pretrained_base_model_path_unet)
|
| 52 |
reference_unet = UNet2DConditionModel.from_pretrained(
|
| 53 |
-
pretrained_base_model_path_unet
|
|
|
|
| 54 |
).to(dtype=self.weight_dtype, device="cuda")
|
| 55 |
|
| 56 |
inference_config_path = os.path.join(base_dir, 'configs', 'inference', 'inference_v2.yaml')
|
|
|
|
| 50 |
pretrained_base_model_path_unet = os.path.join(base_dir, 'pretrained_weights', 'stable-diffusion-v1-5', 'unet')
|
| 51 |
print("model path is " + pretrained_base_model_path_unet)
|
| 52 |
reference_unet = UNet2DConditionModel.from_pretrained(
|
| 53 |
+
pretrained_base_model_path_unet,
|
| 54 |
+
use_safetensors = True
|
| 55 |
).to(dtype=self.weight_dtype, device="cuda")
|
| 56 |
|
| 57 |
inference_config_path = os.path.join(base_dir, 'configs', 'inference', 'inference_v2.yaml')
|
requirements.txt
CHANGED
|
@@ -24,6 +24,10 @@ gradio==3.41.2
|
|
| 24 |
onnxruntime-coreml==1.13.1; python_version == '3.9' and sys_platform == 'darwin' and platform_machine != 'arm64'
|
| 25 |
transformers==4.41.1
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# Add additional dependencies
|
| 28 |
diffusers==0.24.0
|
| 29 |
omegaconf==2.2.3
|
|
@@ -33,10 +37,6 @@ safetensors==0.4.0
|
|
| 33 |
facenet-pytorch==2.5.2
|
| 34 |
dlib==19.22.0
|
| 35 |
|
| 36 |
-
# Stuff huggingface is complaining about
|
| 37 |
-
einops==0.4.1
|
| 38 |
-
av==11.0.0
|
| 39 |
-
|
| 40 |
# Additional dependencies from the first list not present in the second list
|
| 41 |
accelerate==0.21.0
|
| 42 |
clip @ https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip#sha256=b5842c25da441d6c581b53a5c60e0c2127ebafe0f746f8e15561a006c6c3be6a
|
|
|
|
| 24 |
onnxruntime-coreml==1.13.1; python_version == '3.9' and sys_platform == 'darwin' and platform_machine != 'arm64'
|
| 25 |
transformers==4.41.1
|
| 26 |
|
| 27 |
+
# Stuff huggingface is complaining about
|
| 28 |
+
einops==0.4.1
|
| 29 |
+
av==11.0.0
|
| 30 |
+
|
| 31 |
# Add additional dependencies
|
| 32 |
diffusers==0.24.0
|
| 33 |
omegaconf==2.2.3
|
|
|
|
| 37 |
facenet-pytorch==2.5.2
|
| 38 |
dlib==19.22.0
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
# Additional dependencies from the first list not present in the second list
|
| 41 |
accelerate==0.21.0
|
| 42 |
clip @ https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip#sha256=b5842c25da441d6c581b53a5c60e0c2127ebafe0f746f8e15561a006c6c3be6a
|