diff --git a/ldm/dream/server.py b/ldm/dream/server.py index e2eabc3e43..4133eb287c 100644 --- a/ldm/dream/server.py +++ b/ldm/dream/server.py @@ -46,6 +46,9 @@ class DreamServer(BaseHTTPRequestHandler): height = int(post_data['height']) cfgscale = float(post_data['cfgscale']) gfpgan_strength = float(post_data['gfpgan_strength']) + upscale_level = post_data['upscale_level'] + upscale_strength = post_data['upscale_strength'] + upscale = [int(upscale_level),float(upscale_strength)] if upscale_level != '' else None seed = None if int(post_data['seed']) == -1 else int(post_data['seed']) print(f"Request to generate with prompt: {prompt}") @@ -60,7 +63,9 @@ class DreamServer(BaseHTTPRequestHandler): height = height, seed = seed, steps = steps, - gfpgan_strength = gfpgan_strength) + gfpgan_strength = gfpgan_strength, + upscale = upscale + ) else: # Decode initimg as base64 to temp file with open("./img2img-tmp.png", "wb") as f: @@ -74,7 +79,9 @@ class DreamServer(BaseHTTPRequestHandler): cfg_scale = cfgscale, seed = seed, gfpgan_strength=gfpgan_strength, - steps = steps) + upscale = upscale, + steps = steps + ) # Remove the temp file os.remove("./img2img-tmp.png") diff --git a/static/dream_web/index.css b/static/dream_web/index.css index ed840a056a..d4240d3f35 100644 --- a/static/dream_web/index.css +++ b/static/dream_web/index.css @@ -32,6 +32,9 @@ fieldset { padding: 5px 10px 5px 10px; border: 1px solid black; } +#reset-all { + background-color: pink; +} #results { text-align: center; max-width: 1000px; diff --git a/static/dream_web/index.html b/static/dream_web/index.html index 21591ab9b4..31816a2cd4 100644 --- a/static/dream_web/index.html +++ b/static/dream_web/index.html @@ -18,12 +18,22 @@