coldn00dl3s
commited on
Commit
•
5fd8458
1
Parent(s):
e0eb867
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
from diffusers import
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
|
5 |
|
6 |
def get_model():
|
7 |
-
pipe =
|
|
|
|
|
8 |
return pipe
|
9 |
|
10 |
model = get_model()
|
11 |
-
model.to("cpu")
|
12 |
-
model.enable_model_cpu_offload()
|
13 |
|
14 |
|
15 |
def return_image(text,inf_steps,gScale):
|
|
|
1 |
+
from diffusers import StableDiffusionImg2ImgPipeline
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
|
5 |
|
6 |
def get_model():
|
7 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/sdxl-turbo", variant="fp16")
|
8 |
+
pipe.to("cpu")
|
9 |
+
pipe.enable_model_cpu_offload()
|
10 |
return pipe
|
11 |
|
12 |
model = get_model()
|
|
|
|
|
13 |
|
14 |
|
15 |
def return_image(text,inf_steps,gScale):
|