mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-21 02:18:24 +02:00
Merge branch 'gallery' of github.com:JeLuF/stable-diffusion-ui into gallery
This commit is contained in:
commit
1f7c896ad8
@ -103,12 +103,13 @@ def init():
|
|||||||
def get_all_images(db: Session = Depends(get_db)):
|
def get_all_images(db: Session = Depends(get_db)):
|
||||||
from easydiffusion.easydb.mappings import Image
|
from easydiffusion.easydb.mappings import Image
|
||||||
images = db.query(Image).all()
|
images = db.query(Image).all()
|
||||||
sum_string = "<div id='imagecontainer'>"
|
# sum_string = "<div id='imagecontainer'>"
|
||||||
for img in images:
|
# for img in images:
|
||||||
options = f"Path: {img.path}\nPrompt: {img.prompt}\nNegative Prompt: {img.negative_prompt}\nSeed: {img.seed}\nModel: {img.use_stable_diffusion_model}\nSize: {img.height}x{img.width}\nSampler: {img.sampler_name}\nSteps: {img.num_inference_steps}\nGuidance Scale: {img.guidance_scale}\nLoRA: {img.lora}\nUpscaling: {img.use_upscale}\nFace Correction: {img.use_face_correction}\n"
|
# options = f"Path: {img.path}\nPrompt: {img.prompt}\nNegative Prompt: {img.negative_prompt}\nSeed: {img.seed}\nModel: {img.use_stable_diffusion_model}\nSize: {img.height}x{img.width}\nSampler: {img.sampler_name}\nSteps: {img.num_inference_steps}\nGuidance Scale: {img.guidance_scale}\nLoRA: {img.lora}\nUpscaling: {img.use_upscale}\nFace Correction: {img.use_face_correction}\n"
|
||||||
sum_string += f"<img src='/image/{img.path}' title='{options}'>"
|
# sum_string += f"<img src='/image/{img.path}' title='{options}'>"
|
||||||
sum_string += "</div>"
|
# sum_string += "</div>"
|
||||||
return Response(content=sum_string, media_type="text/html")
|
# return Response(content=sum_string, media_type="text/html")
|
||||||
|
return images
|
||||||
|
|
||||||
|
|
||||||
def get_filename_from_url(url):
|
def get_filename_from_url(url):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user