Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,14 +16,14 @@ def read_content(file_path: str) -> str:
|
|
| 16 |
|
| 17 |
|
| 18 |
def predict(prompt, negative_prompt, guidance_scale, num_inference_steps,model, scheduler, lora, lora_weight):
|
| 19 |
-
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V6.0_B1_noVAE", vae=vae)
|
| 20 |
pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
| 21 |
if model == "Realistic_V5.1":
|
| 22 |
-
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae)
|
| 23 |
if model == "Realistic_V5.0":
|
| 24 |
-
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE", vae=vae)
|
| 25 |
if model == "EpicRealism":
|
| 26 |
-
pipeline = diffusers.DiffusionPipeline.from_pretrained("emilianJR/epiCRealism", vae=vae)
|
| 27 |
pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
| 28 |
|
| 29 |
scheduler_class_name = scheduler.split("-")[0]
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
def predict(prompt, negative_prompt, guidance_scale, num_inference_steps,model, scheduler, lora, lora_weight):
|
| 19 |
+
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V6.0_B1_noVAE", vae=vae).to("cuda")
|
| 20 |
pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
| 21 |
if model == "Realistic_V5.1":
|
| 22 |
+
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
|
| 23 |
if model == "Realistic_V5.0":
|
| 24 |
+
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE", vae=vae).to("cuda")
|
| 25 |
if model == "EpicRealism":
|
| 26 |
+
pipeline = diffusers.DiffusionPipeline.from_pretrained("emilianJR/epiCRealism", vae=vae).to("cuda")
|
| 27 |
pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
| 28 |
|
| 29 |
scheduler_class_name = scheduler.split("-")[0]
|