Spaces:
Runtime error
Runtime error
Mehdi Cherti
commited on
Commit
·
df470dc
1
Parent(s):
169bc4a
add description
Browse files
README.md
CHANGED
|
@@ -18,4 +18,13 @@ pinned: false
|
|
| 18 |
|
| 19 |
---
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
---
|
| 20 |
|
| 21 |
+
Text-to-Image Denoising Diffusion GANs is a text-to-image model
|
| 22 |
+
based on Denoising Diffusion GANs <https://arxiv.org/abs/2112.07804>.
|
| 23 |
+
The code is based on their official code <<https://nvlabs.github.io/denoising-diffusion-gan/>,
|
| 24 |
+
which is updated to support text conditioning. Many thanks to the authors of DDGAN for releasing
|
| 25 |
+
the code.
|
| 26 |
+
|
| 27 |
+
The provided models are trained on DiffusionDB <https://arxiv.org/abs/2210.14896>, which is a dataset that was synthetically
|
| 28 |
+
generated with Stable Diffusion, many thanks to the authors for releasing the dataset.
|
| 29 |
+
|
| 30 |
+
Models were trained on JURECA-DC supercomputer at Jülich Supercomputing Centre (JSC), many thanks for the compute provided to train the models.
|
app.py
CHANGED
|
@@ -21,15 +21,16 @@ def load(name):
|
|
| 21 |
if name in cache:
|
| 22 |
return cache[name]
|
| 23 |
else:
|
| 24 |
-
|
| 25 |
-
|
|
|
|
| 26 |
model = load_model(model_config, model_path, device=device)
|
| 27 |
cache[name] = model
|
| 28 |
return model
|
| 29 |
|
| 30 |
models = {
|
| 31 |
-
"diffusion_db_128ch_1timesteps_openclip_vith14":
|
| 32 |
-
"diffusion_db_192ch_2timesteps_openclip_vith14":
|
| 33 |
}
|
| 34 |
default = "diffusion_db_128ch_1timesteps_openclip_vith14"
|
| 35 |
|
|
@@ -62,7 +63,16 @@ def gen(md, model_name, md2, text, seed, nb_samples, width, height):
|
|
| 62 |
return Image.fromarray(grid)
|
| 63 |
|
| 64 |
text = """
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
"""
|
| 67 |
iface = gr.Interface(
|
| 68 |
fn=gen,
|
|
|
|
| 21 |
if name in cache:
|
| 22 |
return cache[name]
|
| 23 |
else:
|
| 24 |
+
cfg_name = models[name]
|
| 25 |
+
model_config = get_model_config(cfg_name)
|
| 26 |
+
model_path = download(name + ".th")
|
| 27 |
model = load_model(model_config, model_path, device=device)
|
| 28 |
cache[name] = model
|
| 29 |
return model
|
| 30 |
|
| 31 |
models = {
|
| 32 |
+
"diffusion_db_128ch_1timesteps_openclip_vith14": "ddgan_ddb_v2",
|
| 33 |
+
"diffusion_db_192ch_2timesteps_openclip_vith14": 'ddgan_ddb_v3',
|
| 34 |
}
|
| 35 |
default = "diffusion_db_128ch_1timesteps_openclip_vith14"
|
| 36 |
|
|
|
|
| 63 |
return Image.fromarray(grid)
|
| 64 |
|
| 65 |
text = """
|
| 66 |
+
Text-to-Image Denoising Diffusion GANs is a text-to-image model
|
| 67 |
+
based on Denoising Diffusion GANs <https://arxiv.org/abs/2112.07804>.
|
| 68 |
+
The code is based on their official code <<https://nvlabs.github.io/denoising-diffusion-gan/>,
|
| 69 |
+
which is updated to support text conditioning. Many thanks to the authors of DDGAN for releasing
|
| 70 |
+
the code.
|
| 71 |
+
|
| 72 |
+
The provided models are trained on DiffusionDB <https://arxiv.org/abs/2210.14896>, which is a dataset that was synthetically
|
| 73 |
+
generated with Stable Diffusion, many thanks to the authors for releasing the dataset.
|
| 74 |
+
|
| 75 |
+
Models were trained on JURECA-DC supercomputer at Jülich Supercomputing Centre (JSC), many thanks for the compute provided to train the models.
|
| 76 |
"""
|
| 77 |
iface = gr.Interface(
|
| 78 |
fn=gen,
|