mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-26 07:35:44 -03:00
Add recipe metadata handling in image processing
- Implemented functionality to append recipe metadata to images during the recipe creation process. - Removed redundant metadata handling from the temporary image processing step, streamlining the image handling logic. - Enhanced the overall image processing workflow for better integration of recipe data.
This commit is contained in:
@@ -423,6 +423,9 @@ class RecipeRoutes:
|
|||||||
with open(image_path, 'wb') as f:
|
with open(image_path, 'wb') as f:
|
||||||
f.write(optimized_image)
|
f.write(optimized_image)
|
||||||
|
|
||||||
|
# Add recipe metadata to the image
|
||||||
|
ExifUtils.append_recipe_metadata(image_path, recipe_data)
|
||||||
|
|
||||||
# Create the recipe JSON
|
# Create the recipe JSON
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
|
|
||||||
@@ -643,9 +646,7 @@ class RecipeRoutes:
|
|||||||
|
|
||||||
# Copy the original image to temp file
|
# Copy the original image to temp file
|
||||||
shutil.copy2(image_path, temp_path)
|
shutil.copy2(image_path, temp_path)
|
||||||
|
processed_path = temp_path
|
||||||
# Add recipe metadata to the image
|
|
||||||
processed_path = ExifUtils.append_recipe_metadata(temp_path, recipe)
|
|
||||||
|
|
||||||
# Create a URL for the processed image
|
# Create a URL for the processed image
|
||||||
# Use a timestamp to prevent caching
|
# Use a timestamp to prevent caching
|
||||||
|
|||||||
Reference in New Issue
Block a user