Omnibus commited on
Commit
a2f8cb5
·
1 Parent(s): 071197c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import torch
3
  from diffusers import StableDiffusionXLImg2ImgPipeline
4
  from diffusers.utils import load_image
5
  from PIL import Image
 
6
  #from diffusers import DiffusionPipeline
7
  '''
8
  pipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
@@ -24,7 +25,8 @@ pipe = pipe.to(device)
24
 
25
 
26
  def resize(value,img):
27
- img = Image.open(img)
 
28
  img = img.resize((value,value))
29
  return img
30
 
 
3
  from diffusers import StableDiffusionXLImg2ImgPipeline
4
  from diffusers.utils import load_image
5
  from PIL import Image
6
+ import requests
7
  #from diffusers import DiffusionPipeline
8
  '''
9
  pipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
 
25
 
26
 
27
  def resize(value,img):
28
+ img = Image.open(requests.get(img, stream=True).raw)
29
+ #img = Image.open(img)
30
  img = img.resize((value,value))
31
  return img
32