Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -144,7 +144,7 @@ def upload_to_ftp(filename):
|
|
144 |
|
145 |
def save_image(img):
|
146 |
unique_name = str(uuid.uuid4()) + ".png"
|
147 |
-
img.save(unique_name,optimize=False,compress_level=0)
|
148 |
return unique_name
|
149 |
|
150 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
@@ -212,7 +212,7 @@ def generate(
|
|
212 |
batch_options["negative_prompt"] = options["negative_prompt"][i:i+BATCH_SIZE]
|
213 |
images.extend(pipe(**batch_options).images)
|
214 |
sd_image_path = f"rv50_{seed}.png"
|
215 |
-
images[0].save(sd_image_path,optimize=False,compress_level=0)
|
216 |
upload_to_ftp(sd_image_path)
|
217 |
image_paths = [save_image(img) for img in images]
|
218 |
return image_paths, seed
|
|
|
144 |
|
145 |
def save_image(img):
|
146 |
unique_name = str(uuid.uuid4()) + ".png"
|
147 |
+
img.save(unique_name,optimize=False,compress_level=0)
|
148 |
return unique_name
|
149 |
|
150 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
|
212 |
batch_options["negative_prompt"] = options["negative_prompt"][i:i+BATCH_SIZE]
|
213 |
images.extend(pipe(**batch_options).images)
|
214 |
sd_image_path = f"rv50_{seed}.png"
|
215 |
+
images[0].save(sd_image_path,optimize=False,compress_level=0)
|
216 |
upload_to_ftp(sd_image_path)
|
217 |
image_paths = [save_image(img) for img in images]
|
218 |
return image_paths, seed
|