rizavelioglu
commited on
Commit
·
2ea1a0c
1
Parent(s):
6127e61
update README
Browse files
README.md
CHANGED
|
@@ -30,36 +30,16 @@ Available models:
|
|
| 30 |
|
| 31 |
## Usage
|
| 32 |
|
| 33 |
-
|
| 34 |
-
import torch
|
| 35 |
-
from huggingface_hub import hf_hub_download
|
| 36 |
-
from tryoffdiff.modeling.model import create_model
|
| 37 |
|
| 38 |
-
repo = "rizavelioglu/tryoffdiff" # Define the repository
|
| 39 |
-
|
| 40 |
-
# --- Helper function to load a model ---
|
| 41 |
-
def load_tryoffdiff_model(model_name, filename, device="cuda"):
|
| 42 |
-
model = create_model(model_name)
|
| 43 |
-
model_path = hf_hub_download(repo_id=repo, filename=filename)
|
| 44 |
-
model.load_state_dict(torch.load(model_path, weights_only=True))
|
| 45 |
-
return model.eval().to(device)
|
| 46 |
-
|
| 47 |
-
tryoffdiffv1 = load_tryoffdiff_model("TryOffDiff", "tryoffdiff.pth")
|
| 48 |
-
tryoffdiffv2_upper = load_tryoffdiff_model("TryOffDiffv2_single", "tryoffdiffv2_upper.pth")
|
| 49 |
-
tryoffdiffv2_lower = load_tryoffdiff_model("TryOffDiffv2_single", "tryoffdiffv2_lower.pth")
|
| 50 |
-
tryoffdiffv2_dress = load_tryoffdiff_model("TryOffDiffv2_single", "tryoffdiffv2_dress.pth")
|
| 51 |
-
tryoffdiffv2_multi = load_tryoffdiff_model("TryOffDiffv2", "tryoffdiffv2_multi.pth")
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
> For a complete running example, see the demo code on [HuggingFace Spaces][hf_spaces].\
|
| 55 |
> For more information on training, inference, and evaluation, refer to the [GitHub repository][github].
|
| 56 |
|
| 57 |
-
|
| 58 |
TL;DR: Not available for commercial use, unless the FULL source code is shared! \
|
| 59 |
This project is intended solely for academic research. No commercial benefits are derived from it.
|
| 60 |
Models are licensed under [Server Side Public License (SSPL)][license]
|
| 61 |
|
| 62 |
-
|
| 63 |
If you use this work, please give a star ⭐ and a citation:
|
| 64 |
```
|
| 65 |
@article{velioglu2024tryoffdiff,
|
|
|
|
| 30 |
|
| 31 |
## Usage
|
| 32 |
|
| 33 |
+
> For a complete running example, see the demo code on [HuggingFace Spaces][hf_spaces].
|
|
|
|
|
|
|
|
|
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
> For more information on training, inference, and evaluation, refer to the [GitHub repository][github].
|
| 36 |
|
| 37 |
+
## License
|
| 38 |
TL;DR: Not available for commercial use, unless the FULL source code is shared! \
|
| 39 |
This project is intended solely for academic research. No commercial benefits are derived from it.
|
| 40 |
Models are licensed under [Server Side Public License (SSPL)][license]
|
| 41 |
|
| 42 |
+
## Citation
|
| 43 |
If you use this work, please give a star ⭐ and a citation:
|
| 44 |
```
|
| 45 |
@article{velioglu2024tryoffdiff,
|