changed to DPM++ 2M Karras scheduler
Browse files- handler.py +8 -9
- text_encoder/pytorch_model.bin +1 -1
- unet/diffusion_pytorch_model.bin +1 -1
- vae/diffusion_pytorch_model.bin +1 -1
handler.py
CHANGED
|
@@ -27,7 +27,7 @@ from PIL import Image
|
|
| 27 |
REPO_DIR = Path(__file__).resolve().parent
|
| 28 |
|
| 29 |
# if local avoid repo url
|
| 30 |
-
print(os.getcwd())
|
| 31 |
|
| 32 |
# set device
|
| 33 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
@@ -103,19 +103,18 @@ class EndpointHandler:
|
|
| 103 |
|
| 104 |
# DPM++ 2M SDE Karras
|
| 105 |
# increase step to avoid high contrast num_inference_steps=30
|
| 106 |
-
self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 107 |
-
self.pipe.scheduler.config,
|
| 108 |
-
use_karras_sigmas=True,
|
| 109 |
-
algorithm_type="sde-dpmsolver++",
|
| 110 |
-
)
|
| 111 |
-
|
| 112 |
-
# DPM++ 2M Karras
|
| 113 |
-
# increase step to avoid high contrast num_inference_steps=30
|
| 114 |
# self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 115 |
# self.pipe.scheduler.config,
|
| 116 |
# use_karras_sigmas=True,
|
|
|
|
| 117 |
# )
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
# Mode boulardus
|
| 120 |
self.pipe.safety_checker = None
|
| 121 |
|
|
|
|
| 27 |
REPO_DIR = Path(__file__).resolve().parent
|
| 28 |
|
| 29 |
# if local avoid repo url
|
| 30 |
+
# print(os.getcwd())
|
| 31 |
|
| 32 |
# set device
|
| 33 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
| 103 |
|
| 104 |
# DPM++ 2M SDE Karras
|
| 105 |
# increase step to avoid high contrast num_inference_steps=30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
# self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 107 |
# self.pipe.scheduler.config,
|
| 108 |
# use_karras_sigmas=True,
|
| 109 |
+
# algorithm_type="sde-dpmsolver++",
|
| 110 |
# )
|
| 111 |
|
| 112 |
+
# DPM++ 2M Karras
|
| 113 |
+
self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 114 |
+
self.pipe.scheduler.config,
|
| 115 |
+
use_karras_sigmas=True,
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
# Mode boulardus
|
| 119 |
self.pipe.safety_checker = None
|
| 120 |
|
text_encoder/pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 492306077
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38a67003cd791d4fc008ae1fd24615b8b168f83cc8e853b746a7ec7bb3d64f42
|
| 3 |
size 492306077
|
unet/diffusion_pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3438366373
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b64c917a491e553494fa0eb452824cc068296273a09436ca0803b06c42046c7d
|
| 3 |
size 3438366373
|
vae/diffusion_pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 334712113
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a425a89f2e522790b3975b93ed380814e68ec77a04841dced0832cad70eab929
|
| 3 |
size 334712113
|