hassanblend
commited on
Commit
•
ec451ae
1
Parent(s):
c525df0
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline, DPMSolverMultistepScheduler
|
2 |
import gradio as gr
|
3 |
import torch
|
|
|
4 |
from PIL import Image
|
5 |
|
6 |
model_id = 'hassanblend/HassanBlend1.5'
|
@@ -19,10 +20,12 @@ scheduler = DPMSolverMultistepScheduler(
|
|
19 |
lower_order_final=True,
|
20 |
)
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
26 |
|
27 |
pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
|
28 |
model_id,
|
|
|
1 |
from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline, DPMSolverMultistepScheduler
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
+
pipe = pipe.to("cuda")
|
5 |
from PIL import Image
|
6 |
|
7 |
model_id = 'hassanblend/HassanBlend1.5'
|
|
|
20 |
lower_order_final=True,
|
21 |
)
|
22 |
|
23 |
+
vae = diffusers.AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse", torch_dtype=torch.float16)
|
24 |
+
pipe = diffusers.StableDiffusionPipeline.from_pretrained(
|
25 |
+
"hassanblend/HassanBlend1.5.1.2",
|
26 |
+
torch_dtype=torch.float16,
|
27 |
+
vae=vae,
|
28 |
+
)
|
29 |
|
30 |
pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
|
31 |
model_id,
|