Spaces:
Runtime error
Runtime error
Commit
•
0bd58d3
1
Parent(s):
5b09dff
Update app.py
Browse files
app.py
CHANGED
@@ -128,7 +128,7 @@ def shuffle_images():
|
|
128 |
def save_preferences(lora_1_id, lora_1_scale, lora_2_id, lora_2_scale, prompt, generated_image, thumbs_direction, seed):
|
129 |
image_path = IMAGE_DATASET_DIR / f"{uuid4()}.png"
|
130 |
with scheduler.lock:
|
131 |
-
Image.fromarray(
|
132 |
with IMAGE_JSONL_PATH.open("a") as f:
|
133 |
json.dump({"prompt": prompt, "file_name":image_path.name, "lora_1_id": lora_2_id, "lora_1_scale": lora_1_scale, "lora_2_id": lora_2_id, "lora_2_scale": lora_2_scale, "thumbs_direction": thumbs_direction, "seed": seed}, f)
|
134 |
f.write("\n")
|
|
|
128 |
def save_preferences(lora_1_id, lora_1_scale, lora_2_id, lora_2_scale, prompt, generated_image, thumbs_direction, seed):
|
129 |
image_path = IMAGE_DATASET_DIR / f"{uuid4()}.png"
|
130 |
with scheduler.lock:
|
131 |
+
Image.fromarray(generated_image).save(image_path)
|
132 |
with IMAGE_JSONL_PATH.open("a") as f:
|
133 |
json.dump({"prompt": prompt, "file_name":image_path.name, "lora_1_id": lora_2_id, "lora_1_scale": lora_1_scale, "lora_2_id": lora_2_id, "lora_2_scale": lora_2_scale, "thumbs_direction": thumbs_direction, "seed": seed}, f)
|
134 |
f.write("\n")
|