mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
add segmind vega
This commit is contained in:
@@ -68,7 +68,8 @@ def pil_to_temp_file(self, img: Image, dir: str, format="png") -> str: # pylint:
|
||||
with tempfile.NamedTemporaryFile(delete=False, suffix=".png", dir=dir) as tmp:
|
||||
name = tmp.name
|
||||
img.save(name, pnginfo=(metadata if use_metadata else None))
|
||||
shared.log.debug(f'Saving temp: image="{name}"')
|
||||
size = os.path.getsize(name)
|
||||
shared.log.debug(f'Saving temp: image="{name}" resolution={img.width}x{img.height} size={size}')
|
||||
params = ', '.join([f'{k}: {v}' for k, v in img.info.items()])
|
||||
params = params[12:] if params.startswith('parameters: ') else params
|
||||
with open(os.path.join(paths.data_path, "params.txt"), "w", encoding="utf8") as file:
|
||||
|
||||
Reference in New Issue
Block a user