Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,12 +31,6 @@ if torch.cuda.is_available():
|
|
| 31 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 32 |
pipe.to("cuda")
|
| 33 |
|
| 34 |
-
|
| 35 |
-
def save_image(img):
|
| 36 |
-
unique_name = str(uuid.uuid4()) + ".png"
|
| 37 |
-
img.save(unique_name)
|
| 38 |
-
return unique_name
|
| 39 |
-
|
| 40 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
| 41 |
if randomize_seed:
|
| 42 |
seed = random.randint(0, MAX_SEED)
|
|
@@ -73,10 +67,9 @@ def generate(
|
|
| 73 |
|
| 74 |
}
|
| 75 |
|
| 76 |
-
images = pipe(**options).images
|
| 77 |
|
| 78 |
-
|
| 79 |
-
return image_paths, seed
|
| 80 |
|
| 81 |
|
| 82 |
examples = [
|
|
|
|
| 31 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
| 32 |
pipe.to("cuda")
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
| 35 |
if randomize_seed:
|
| 36 |
seed = random.randint(0, MAX_SEED)
|
|
|
|
| 67 |
|
| 68 |
}
|
| 69 |
|
| 70 |
+
images = pipe(**options).images[0]
|
| 71 |
|
| 72 |
+
return images, seed
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
examples = [
|