Commit caf2f1a4 authored by gd1551's avatar gd1551 Committed by GitHub

fix comment seed

parent 16890c43
......@@ -104,18 +104,18 @@ def generate(request: GenerationRequest):
images = model.sample(request)
seed = request.seed
comment = json.dumps({"steps":request.steps,"sampler":request.sampler,"seed":request.seed,"strength":request.strength,"noise":request.noise,"scale":request.scale})
images_encoded = []
for x in range(len(images)):
if seed is not None:
request.seed = seed
seed += 1
comment = json.dumps({"steps":request.steps,"sampler":request.sampler,"seed":request.seed,"strength":request.strength,"noise":request.noise,"scale":request.scale})
metadata = PngInfo()
metadata.add_text("Title", "AI generated image")
metadata.add_text("Description", request.prompt)
metadata.add_text("Software", "NovelAI")
metadata.add_text("Source", "Stable Diffusion "+model_hash)
if seed is not None:
request.seed = seed
seed += 1
metadata.add_text("Comment", comment)
#image = simplejpeg.encode_jpeg(images[x], quality=95)
image = Image.fromarray(images[x])
......
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