Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disco notebook #1507

Merged
merged 1 commit into from
Dec 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions configs/disco_diffusion/tutorials.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
"!git clone -b dev-1.x https://github.com/open-mmlab/mmediting.git \n",
"%cd mmediting\n",
"!pip install -r requirements.txt\n",
"!pip install -e .\n",
"%cd configs/disco_diffusion"
"!pip install -e ."
]
},
{
Expand Down Expand Up @@ -122,7 +121,7 @@
"metadata": {},
"outputs": [],
"source": [
"config = 'disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"config = 'configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"disco = MODELS.build(Config.fromfile(config).model).cuda().eval()\n",
"text_prompts = {\n",
" 0: [\"clouds surround the mountains and Chinese palaces, sunshine, lake, overlook, overlook, unreal engine, light effect, Dream, Greg Rutkowski, James Gurney, artstation\"]\n",
Expand Down Expand Up @@ -219,7 +218,7 @@
"text_prompts = {\n",
" 0: [\"clouds surround the mountains and Chinese palaces,sunshine,lake,overlook,overlook,unreal engine,light effect,Dream,Greg Rutkowski,James Gurney,artstation\"]\n",
"}\n",
"config = 'disco-diffusion_adm-u-finetuned_imagenet-256x256.py'\n",
"config = 'configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-256x256.py'\n",
"disco = MODELS.build(Config.fromfile(config).model).cuda().eval()\n",
"image = disco.infer(width=512, height=448, text_prompts=text_prompts, show_progress=True, num_inference_steps=num_inference_steps, eta=0.8, seed=seed)['samples']\n",
"show_tensor(image)"
Expand All @@ -233,7 +232,7 @@
"source": [
"\n",
"# 512x512_diffusion_uncond_finetune_008100\n",
"config = 'disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"config = 'configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"disco = MODELS.build(Config.fromfile(config).model).cuda().eval()\n",
"image = disco.infer(width=1280, height=768, text_prompts=text_prompts, show_progress=True, num_inference_steps=num_inference_steps, eta=0.8, seed=seed)['samples']\n",
"show_tensor(image)\n"
Expand Down Expand Up @@ -294,7 +293,7 @@
"from mmedit.models.editors.disco_diffusion.guider import ImageTextGuider\n",
"\n",
"\n",
"config = 'disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"config = 'configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"disco = MODELS.build(Config.fromfile(config).model).cuda().eval()\n",
"text_prompts = {0: [\"A beautiful painting of a map of the city of Atlantis\"]}\n"
]
Expand Down Expand Up @@ -1179,7 +1178,7 @@
"metadata": {},
"outputs": [],
"source": [
"config = 'disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"config = 'configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-512x512.py'\n",
"disco = MODELS.build(Config.fromfile(config).model).cuda().eval()"
]
},
Expand Down