INNER CODE UNIT · Python
download_weights
fofr/cog-face-to-sticker · weights_downloader.py:15
def download_weights(self, weight_str):
if weight_str in self.weights_map:
if self.weights_manifest.is_non_commercial_only(weight_str):
print(
f"⚠️ {weight_str} is for non-commercial use only. Unless you have obtained a commercial license.\nDetails: https://github.com/fofr/cog-comfyui/blob/main/weights_licenses.md"
)
self.download_if_not_exists(
weight_str,
self.weights_map[weight_str]["url"],
self.weights_map[weight_str]["dest"],
)
else:
raise ValueError(
f"{weight_str} unavailable. View the list of available weights: https://github.com/fofr/cog-comfyui/blob/main/supported_weights.md"
)
def download_torch_checkpoints(self):
self.download_if_not_exists(