amazonaws-sp commited on
Commit
24e939a
1 Parent(s): 5af7802

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ import spaces
12
  import torch
13
  from PIL import Image
14
  from io import BytesIO
15
- from diffusers import AutoencoderKL, DiffusionPipeline, StableDiffusionImg2ImgPipeline, StableDiffusionXLPipeline
16
 
17
  DESCRIPTION = "# Run any LoRA or SD Model"
18
  if not torch.cuda.is_available():
@@ -61,7 +61,7 @@ def generate(
61
  if torch.cuda.is_available():
62
 
63
  if use_img2img:
64
- pipe = StableDiffusionXLPipeline.from_pretrained(model, torch_dtype=torch.float16)
65
 
66
  response = requests.get(url)
67
  init_image = Image.open(BytesIO(response.content)).convert("RGB")
 
12
  import torch
13
  from PIL import Image
14
  from io import BytesIO
15
+ from diffusers import AutoencoderKL, DiffusionPipeline, AutoPipelineForImage2Image
16
 
17
  DESCRIPTION = "# Run any LoRA or SD Model"
18
  if not torch.cuda.is_available():
 
61
  if torch.cuda.is_available():
62
 
63
  if use_img2img:
64
+ pipe = AutoPipelineForImage2Image.from_pretrained(model, torch_dtype=torch.float16)
65
 
66
  response = requests.get(url)
67
  init_image = Image.open(BytesIO(response.content)).convert("RGB")