import os import re import shutil import json import torch import tqdm from modules import shared, images, sd_models, sd_vae, sd_models_config, errors from modules.ui_common import plaintext_to_html import gradio as gr import safetensors.torch def run_pnginfo(image): if image is None: return '', '', '' geninfo, items = images.read_info_from_image(image) items = {**{'parameters': geninfo}, **items} info = '' for key, text in items.items(): info += f"""
{plaintext_to_html(str(key))}
{plaintext_to_html(str(text))}
{message}