Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
-
from diffusers import
|
4 |
import torch
|
5 |
from PIL import Image, ImageOps
|
6 |
import time
|
7 |
|
8 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
9 |
-
pipeline =
|
10 |
|
11 |
def get_select_index(evt: gr.SelectData):
|
12 |
return evt.index
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
+
from diffusers import StableDiffusion3InpaintPipeline, AutoencoderKL
|
4 |
import torch
|
5 |
from PIL import Image, ImageOps
|
6 |
import time
|
7 |
|
8 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
9 |
+
pipeline = StableDiffusion3InpaintPipeline(vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True).to("cuda")
|
10 |
|
11 |
def get_select_index(evt: gr.SelectData):
|
12 |
return evt.index
|