diff --git a/ui/easydiffusion/bucket_manager.py b/ui/easydiffusion/bucket_manager.py index 43b5f147..9b7aeae1 100644 --- a/ui/easydiffusion/bucket_manager.py +++ b/ui/easydiffusion/bucket_manager.py @@ -108,6 +108,19 @@ def init(): if model != "": images = images.filter(GalleryImage.use_stable_diffusion_model.like("%"+model+"%")) return images.all() + + @server_api.get("/single_image") + def get_single_image(image_path: str, db: Session = Depends(get_db)): + from easydiffusion.easydb.mappings import GalleryImage + image_path = str(abspath(image_path)) + try: + image: GalleryImage = db.query(GalleryImage).filter(GalleryImage.path == image_path).first() + head = "
" + body = "Path: " + str(self.path) + "
" + \ + "Seed: " + str(self.seed) + "" + \ + "Stable Diffusion Model: " + str(self.use_stable_diffusion_model) + "" + \ + "Prompt: " + str(self.prompt) + "" + \ + "Negative Prompt: " + str(self.negative_prompt) + "" + \ + "Clip Skip: " + str(self.clip_skip) + "" + \ + "VAE Model: " + str(self.use_vae_model) + "" + \ + "Sampler: " + str(self.sampler_name) + "" + \ + "Size: " + str(self.height) + "x" + str(self.width) + "" + \ + "Inference Steps: " + str(self.num_inference_steps) + "" + \ + "Guidance Scale: " + str(self.guidance_scale) + "" + \ + "LoRA: " + str(self.lora) + "" + \ + "Hypernetwork: " + str(self.use_hypernetwork_model) + "" + \ + "Tiling: " + str(self.tiling) + "" + \ + "Face Correction: " + str(self.use_face_correction) + "" + \ + "Upscale: " + str(self.use_upscale) + "" + \ + "Time Created: " + str(self.time_created) + "" + \ + "NSFW: " + str(self.nsfw) + "