Spaces:
Runtime error
Runtime error
iterative outputs
#4
by
akhaliq
HF staff
- opened
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🧨
|
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.2.1b0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
CHANGED
@@ -7,10 +7,10 @@ import numpy as np
|
|
7 |
|
8 |
pipeline = LDMPipeline.from_pretrained("CompVis/ldm-celebahq-256")
|
9 |
|
10 |
-
def predict(steps
|
11 |
generator = torch.manual_seed(seed)
|
12 |
-
|
13 |
-
|
14 |
|
15 |
random_seed = random.randint(0, 2147483647)
|
16 |
gr.Interface(
|
@@ -23,4 +23,4 @@ gr.Interface(
|
|
23 |
css="#output_image{width: 256px}",
|
24 |
title="ldm-celebahq-256 - 🧨 diffusers library",
|
25 |
description="This Spaces contains an unconditional Latent Diffusion process for the <a href=\"https://huggingface.co/CompVis/ldm-celebahq-256\">ldm-celebahq-256</a> face generator model by <a href=\"https://huggingface.co/CompVis\">CompVis</a> using the <a href=\"https://github.com/huggingface/diffusers\">diffusers library</a>. The goal of this demo is to showcase the diffusers library capabilities. If you want the state-of-the-art experience with Latent Diffusion text-to-image check out the <a href=\"https://huggingface.co/spaces/multimodalart/latentdiffusion\">main Spaces</a>.",
|
26 |
-
).launch()
|
|
|
7 |
|
8 |
pipeline = LDMPipeline.from_pretrained("CompVis/ldm-celebahq-256")
|
9 |
|
10 |
+
def predict(steps, seed):
|
11 |
generator = torch.manual_seed(seed)
|
12 |
+
for i in range(1,steps):
|
13 |
+
yield pipeline(generator=generator, num_inference_steps=i)["sample"][0]
|
14 |
|
15 |
random_seed = random.randint(0, 2147483647)
|
16 |
gr.Interface(
|
|
|
23 |
css="#output_image{width: 256px}",
|
24 |
title="ldm-celebahq-256 - 🧨 diffusers library",
|
25 |
description="This Spaces contains an unconditional Latent Diffusion process for the <a href=\"https://huggingface.co/CompVis/ldm-celebahq-256\">ldm-celebahq-256</a> face generator model by <a href=\"https://huggingface.co/CompVis\">CompVis</a> using the <a href=\"https://github.com/huggingface/diffusers\">diffusers library</a>. The goal of this demo is to showcase the diffusers library capabilities. If you want the state-of-the-art experience with Latent Diffusion text-to-image check out the <a href=\"https://huggingface.co/spaces/multimodalart/latentdiffusion\">main Spaces</a>.",
|
26 |
+
).queue().launch()
|