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] Fix disco inference #1673

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/disco_diffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> [Disco Diffusion](https://github.com/alembics/disco-diffusion)

> **Task**: Text2Image, Image2Image, diffusion
> **Task**: Text2Image, Image2Image

<!-- [ALGORITHM] -->

Expand Down
7 changes: 3 additions & 4 deletions configs/disco_diffusion/metafile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Collections:
Task:
- text2image
- image2image
- diffusion
Year: 2022
Models:
- Config: configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-512x512.py
Expand All @@ -16,21 +15,21 @@ Models:
Results:
- Dataset: ImageNet
Metrics: {}
Task: Text2Image, Image2Image, diffusion
Task: Text2Image, Image2Image
Weights: https://download.openmmlab.com/mmediting/synthesizers/disco/adm-u_finetuned_imagenet-512x512-ab471d70.pth
- Config: configs/disco_diffusion/disco-diffusion_adm-u-finetuned_imagenet-256x256.py
In Collection: Disco Diffusion
Name: disco-diffusion_adm-u-finetuned_imagenet-256x256
Results:
- Dataset: ImageNet
Metrics: {}
Task: Text2Image, Image2Image, diffusion
Task: Text2Image, Image2Image
Weights: <>
- Config: configs/disco_diffusion/disco-diffusion_portrait-generator-v001.py
In Collection: Disco Diffusion
Name: disco-diffusion_portrait-generator-v001
Results:
- Dataset: unknown
Metrics: {}
Task: Text2Image, Image2Image, diffusion
Task: Text2Image, Image2Image
Weights: https://download.openmmlab.com/mmediting/synthesizers/disco/adm-u-cvt-rgb_portrait-v001-f4a3f3bc.pth
22 changes: 15 additions & 7 deletions demo/mmediting_inference_tutorial.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion mmedit/apis/inferencers/mmedit_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def __init__(self,
elif self.task in ['video_interpolation', 'Video Interpolation']:
self.inferencer = VideoInterpolationInferencer(
config, ckpt, device, extra_parameters)
elif self.task in ['text2image', 'Text2Image']:
elif self.task in [
'text2image', 'Text2Image', 'Text2Image, Image2Image'
]:
self.inferencer = Text2ImageInferencer(
config, ckpt, device, extra_parameters, seed=seed)
elif self.task in ['3D_aware_generation', '3D-aware Generation']:
Expand Down