Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from diffusers.models import AutoencoderKL
|
|
| 5 |
|
| 6 |
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
|
| 7 |
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
|
| 8 |
-
|
| 9 |
|
| 10 |
def read_content(file_path: str) -> str:
|
| 11 |
"""read the content of target file
|
|
@@ -17,9 +17,6 @@ def read_content(file_path: str) -> str:
|
|
| 17 |
|
| 18 |
|
| 19 |
def predict(prompt, negative_prompt, guidance_scale, num_inference_steps, scheduler, lora, lora_weight):
|
| 20 |
-
pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
|
| 21 |
-
|
| 22 |
-
|
| 23 |
scheduler_class_name = scheduler.split("-")[0]
|
| 24 |
add_kwargs = {}
|
| 25 |
if len(scheduler.split("-")) > 1:
|
|
|
|
| 5 |
|
| 6 |
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
|
| 7 |
pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
|
| 8 |
+
pipeline.safety_checker = lambda images, **kwargs: (images, False)
|
| 9 |
|
| 10 |
def read_content(file_path: str) -> str:
|
| 11 |
"""read the content of target file
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
def predict(prompt, negative_prompt, guidance_scale, num_inference_steps, scheduler, lora, lora_weight):
|
|
|
|
|
|
|
|
|
|
| 20 |
scheduler_class_name = scheduler.split("-")[0]
|
| 21 |
add_kwargs = {}
|
| 22 |
if len(scheduler.split("-")) > 1:
|