Commit 6762f292 authored by kurumuz's avatar kurumuz

Merge branch 'main' of https://github.com/NovelAI/hydra-node-http into main

parents 8e6f7268 048d419c
......@@ -233,6 +233,7 @@ class StableDiffusionModel(nn.Module):
np.random.seed(request.seed)
if request.image is not None:
request.steps = 50
#request.sampler = "ddim_img2img" #enforce ddim for now
if request.sampler == "plms":
request.sampler = "k_lms"
......
......@@ -65,16 +65,6 @@ def sanitize_stable_diffusion(request, config):
if request.steps > 50:
return False, "steps must be smaller than 50"
pixels = request.height * request.width
if (pixels > 1024*512 and pixels <= 1024*1204) and request.n_samples > 1:
return False, "n_samples must be 1 or smaller at this resolution"
if (pixels > 512*512 and pixels <= 1024*512) and request.n_samples > 2:
return False, "n_samples must be 2 or smaller this resolution"
if (pixels > 256*256 and pixels <= 512*512) and request.n_samples > 4:
return False, "n_samples must be 4 or smaller at this resolution"
if request.width * request.height == 0:
return False, "width and height must be non-zero"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment