Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import gradio as gr
|
|
| 6 |
import torch
|
| 7 |
#from torch import autocast // only for GPU
|
| 8 |
from PIL import Image
|
| 9 |
-
from diffusers import
|
| 10 |
|
| 11 |
print("hello sylvain")
|
| 12 |
|
|
@@ -14,7 +14,7 @@ YOUR_TOKEN=MY_SECRET_TOKEN
|
|
| 14 |
|
| 15 |
device="cpu"
|
| 16 |
|
| 17 |
-
pipe =
|
| 18 |
pipe.to(device)
|
| 19 |
|
| 20 |
def infer(prompt, init_image):
|
|
|
|
| 6 |
import torch
|
| 7 |
#from torch import autocast // only for GPU
|
| 8 |
from PIL import Image
|
| 9 |
+
from diffusers import StableDiffusionImg2ImgPipeline
|
| 10 |
|
| 11 |
print("hello sylvain")
|
| 12 |
|
|
|
|
| 14 |
|
| 15 |
device="cpu"
|
| 16 |
|
| 17 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=YOUR_TOKEN)
|
| 18 |
pipe.to(device)
|
| 19 |
|
| 20 |
def infer(prompt, init_image):
|