JoPmt commited on
Commit
fc91bb4
·
1 Parent(s): 61922a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -21,8 +21,9 @@ def plex(cook, one, two):
21
  ###goof = load_image(img).resize((512, 512))
22
  negative_prompt = "lowres,text,bad quality,low quality,jpeg artifacts,ugly,bad hands,bad face,blurry,bad eyes,watermark,signature"
23
  warp_out = warp_prior(prompt=cook, height=512,width=512,negative_prompt=negative_prompt,guidance_scale=two, num_inference_steps=one,generator=generator,output_type="np")
 
24
  primpt = ""
25
- imas = warp(**warp_out, height=512, width=512, num_inference_steps=one, prompt=cook,negative_prompt=primpt,guidance_scale=0.0,output_type="pil",generator=generator).images[0]
26
  return imas
27
 
28
  iface = gr.Interface(fn=plex,outputs=gr.Image(label="Generated Output Image"),inputs=[gr.Textbox(label="prompt"), gr.Slider(label="Inference steps",minimum=1,step=1,maximum=10,value=5), gr.Slider(label="Prior guidance scale",minimum=4.1,step=0.1,maximum=19.9,value=4.1)], title="Txt2Img Wrstchn SD", description="Txt2Img Wrstchn SD")
 
21
  ###goof = load_image(img).resize((512, 512))
22
  negative_prompt = "lowres,text,bad quality,low quality,jpeg artifacts,ugly,bad hands,bad face,blurry,bad eyes,watermark,signature"
23
  warp_out = warp_prior(prompt=cook, height=512,width=512,negative_prompt=negative_prompt,guidance_scale=two, num_inference_steps=one,generator=generator,output_type="np")
24
+ warp_out = warp_out.cpu().numpy()
25
  primpt = ""
26
+ imas = warp(warp_out, height=512, width=512, num_inference_steps=one, prompt=cook,negative_prompt=primpt,guidance_scale=0.0,output_type="pil",generator=generator).images[0]
27
  return imas
28
 
29
  iface = gr.Interface(fn=plex,outputs=gr.Image(label="Generated Output Image"),inputs=[gr.Textbox(label="prompt"), gr.Slider(label="Inference steps",minimum=1,step=1,maximum=10,value=5), gr.Slider(label="Prior guidance scale",minimum=4.1,step=0.1,maximum=19.9,value=4.1)], title="Txt2Img Wrstchn SD", description="Txt2Img Wrstchn SD")