Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
-
from diffusers import
|
| 4 |
from PIL import Image
|
| 5 |
from typing import List
|
| 6 |
#StableDiffusionImg2ImgPipeline
|
| 7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 8 |
model_id = "stabilityai/stable-diffusion-2-1-unclip-small"
|
| 9 |
|
| 10 |
-
pipe =
|
| 11 |
model_id,
|
| 12 |
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
|
| 13 |
safety_checker=None
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
+
from diffusers import StableDiffusionImg2ImgPipeline
|
| 4 |
from PIL import Image
|
| 5 |
from typing import List
|
| 6 |
#StableDiffusionImg2ImgPipeline
|
| 7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 8 |
model_id = "stabilityai/stable-diffusion-2-1-unclip-small"
|
| 9 |
|
| 10 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
| 11 |
model_id,
|
| 12 |
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
|
| 13 |
safety_checker=None
|