Omnibus commited on
Commit
0feedb8
·
1 Parent(s): 8dbfc5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,15 +28,15 @@ 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):
35
  #source_img = load_image(source_img).convert("RGB")
36
 
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
 
 
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):
35
  #source_img = load_image(source_img).convert("RGB")
36
 
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