{ "cells": [ { "cell_type": "code", "execution_count": 15, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "import huggingface_hub\n", "import utils" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "525a0eaa021f4fdebd9138f4e7c5ab65", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HTML(value='
main\n", "\n" ] }, { "data": { "text/plain": [ "'https://huggingface.co/johko/stylegan_animeface512/commit/2841156bad3c5a5f47f3edbf4a41880ea8fd3ad3'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "animeface_model.push_to_hub(\"johko/stylegan_animeface512\")" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Building generator for model `pggan_celebahq1024` ...\n", "Finish building generator.\n", "Loading checkpoint from `checkpoints/pggan_celebahq1024.pth` ...\n", "Finish loading checkpoint.\n" ] } ], "source": [ "celebhq_model = utils.load_generator(\"pggan_celebahq1024\")" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Cloning https://huggingface.co/johko/pggan-celebahq-1024 into local empty directory.\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ef4086b23a654b079bd6a3678140c50d", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Upload file pytorch_model.bin: 0%| | 32.0k/88.1M [00:00 main\n", "\n" ] }, { "data": { "text/plain": [ "'https://huggingface.co/johko/pggan-celebahq-1024/commit/278449f8416d38a0233c980774528d32c4eee99c'" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "celebhq_model.push_to_hub(\"johko/pggan-celebahq-1024\")" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Building generator for model `stylegan_car512` ...\n", "Finish building generator.\n", "Loading checkpoint from `checkpoints/stylegan_car512.pth` ...\n", "Finish loading checkpoint.\n" ] } ], "source": [ "cars_model = utils.load_generator(\"stylegan_car512\")" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Building generator for model `stylegan_cat256` ...\n", "Finish building generator.\n", "Loading checkpoint from `checkpoints/stylegan_cat256.pth` ...\n", "Finish loading checkpoint.\n" ] } ], "source": [ "cats_model = utils.load_generator(\"stylegan_cat256\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Cloning https://huggingface.co/johko/stylegan_cat256 into local empty directory.\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "651e9bff9c9f4555814171195e36d4d3", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Upload file pytorch_model.bin: 0%| | 32.0k/100M [00:00