Omnibus commited on
Commit
3cb3bf4
·
1 Parent(s): 0ded2b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,7 +28,7 @@ def resize(value,img):
28
  img = Image.open(requests.get(img, stream=True).raw)
29
  img.save("tmp_im.png")
30
  img = Image.open("tmp_im.png")
31
- img = img.resize((value,value))
32
  return img
33
 
34
  def infer(source_img, prompt, negative_prompt, guide, steps, seed, Strength):
@@ -37,7 +37,7 @@ def infer(source_img, prompt, negative_prompt, guide, steps, seed, Strength):
37
  generator = torch.Generator(device).manual_seed(seed)
38
  source_image = resize(768, source_img)
39
  source_image.save('source.png')
40
- image = pipe(prompt, negative_prompt=negative_prompt, image=source_img, strength=Strength, guidance_scale=guide, num_inference_steps=steps).images[0]
41
  return image
42
 
43
  gr.Interface(fn=infer, inputs=[gr.Textbox(), gr.Textbox(label = 'Prompt Input Text. 77 Token (Keyword or Symbol) Maximum'), gr.Textbox(label='What you Do Not want the AI to generate.'),
 
28
  img = Image.open(requests.get(img, stream=True).raw)
29
  img.save("tmp_im.png")
30
  img = Image.open("tmp_im.png")
31
+ #img = img.resize((value,value))
32
  return img
33
 
34
  def infer(source_img, prompt, negative_prompt, guide, steps, seed, Strength):
 
37
  generator = torch.Generator(device).manual_seed(seed)
38
  source_image = resize(768, source_img)
39
  source_image.save('source.png')
40
+ image = pipe(prompt, negative_prompt=negative_prompt, image=source_image, strength=Strength, guidance_scale=guide, num_inference_steps=steps).images[0]
41
  return image
42
 
43
  gr.Interface(fn=infer, inputs=[gr.Textbox(), gr.Textbox(label = 'Prompt Input Text. 77 Token (Keyword or Symbol) Maximum'), gr.Textbox(label='What you Do Not want the AI to generate.'),