Spaces:
Running
on
Zero
Running
on
Zero
amazonaws-la
commited on
Commit
•
10a0a96
1
Parent(s):
efae2b2
Update app.py
Browse files
app.py
CHANGED
@@ -50,12 +50,13 @@ def generate(
|
|
50 |
num_inference_steps_refiner: int = 25,
|
51 |
use_lora: bool = False,
|
52 |
apply_refiner: bool = False,
|
53 |
-
model = '
|
54 |
-
vaecall = '
|
55 |
lora = 'amazonaws-la/juliette',
|
56 |
) -> PIL.Image.Image:
|
57 |
if torch.cuda.is_available():
|
58 |
-
|
|
|
59 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
60 |
|
61 |
if use_lora:
|
|
|
50 |
num_inference_steps_refiner: int = 25,
|
51 |
use_lora: bool = False,
|
52 |
apply_refiner: bool = False,
|
53 |
+
model = 'SG161222/Realistic_Vision_V6.0_B1_noVAE',
|
54 |
+
vaecall = 'stabilityai/sd-vae-ft-mse',
|
55 |
lora = 'amazonaws-la/juliette',
|
56 |
) -> PIL.Image.Image:
|
57 |
if torch.cuda.is_available():
|
58 |
+
vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
|
59 |
+
pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
|
60 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
61 |
|
62 |
if use_lora:
|