fffiloni commited on
Commit
dfde977
1 Parent(s): e078500

Update to SD 1.5

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,7 +20,7 @@ device="cpu"
20
  #prompt_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=YOUR_TOKEN)
21
  #prompt_pipe.to(device)
22
 
23
- img_pipe = StableDiffusionImg2ImgPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=YOUR_TOKEN)
24
  img_pipe.to(device)
25
 
26
  source_img = gr.Image(source="upload", type="filepath", label="init_img | 512*512 px")
@@ -46,7 +46,7 @@ def infer(source_img, prompt, guide, steps, seed, strength):
46
  images = []
47
  safe_image = Image.open(r"unsafe.png")
48
 
49
- for i, image in enumerate(images_list["sample"]):
50
  if(images_list["nsfw_content_detected"][i]):
51
  images.append(safe_image)
52
  else:
 
20
  #prompt_pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=YOUR_TOKEN)
21
  #prompt_pipe.to(device)
22
 
23
+ img_pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_auth_token=YOUR_TOKEN)
24
  img_pipe.to(device)
25
 
26
  source_img = gr.Image(source="upload", type="filepath", label="init_img | 512*512 px")
 
46
  images = []
47
  safe_image = Image.open(r"unsafe.png")
48
 
49
+ for i, image in enumerate(images_list["images"]):
50
  if(images_list["nsfw_content_detected"][i]):
51
  images.append(safe_image)
52
  else: