Chris4K commited on
Commit
01e9899
·
verified ·
1 Parent(s): 057604e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,13 +6,13 @@ import torch
6
  def load_image_generator():
7
  try:
8
  model = StableDiffusionXLImg2ImgPipeline.from_pretrained(
9
- "stabilityai/stable-diffusion-xl-base-1.0",
10
  torch_dtype=torch.float16,
11
  variant="fp16",
12
  use_safetensors=True
13
  )
14
  # Ensure it runs on CPU
15
- model = model.to("cpu")
16
  return model
17
  except Exception as e:
18
  print(f"Error loading model: {e}")
 
6
  def load_image_generator():
7
  try:
8
  model = StableDiffusionXLImg2ImgPipeline.from_pretrained(
9
+ "stabilityai/stable-diffusion-2-1",
10
  torch_dtype=torch.float16,
11
  variant="fp16",
12
  use_safetensors=True
13
  )
14
  # Ensure it runs on CPU
15
+ #model = model.to("cpu")
16
  return model
17
  except Exception as e:
18
  print(f"Error loading model: {e}")