Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,17 +6,20 @@ import gradio as gr
|
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
from PIL import Image
|
9 |
-
from diffusers import
|
10 |
from huggingface_hub import hf_hub_download, InferenceClient
|
11 |
|
12 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
13 |
-
pipe = StableDiffusionXLPipeline.from_pretrained("
|
|
|
|
|
14 |
pipe.to("cuda")
|
15 |
|
16 |
-
refiner =
|
17 |
refiner.to("cuda")
|
18 |
|
19 |
-
pipe_fast = StableDiffusionXLPipeline.from_pretrained("SG161222/
|
|
|
20 |
pipe_fast.to("cuda")
|
21 |
|
22 |
help_text = """
|
|
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
from PIL import Image
|
9 |
+
from diffusers import StableDiffusionXLImg2ImgPipeline, StableDiffusionXLPipeline, EDMEulerScheduler, StableDiffusionXLInstructPix2PixPipeline, AutoencoderKL, EulerAncestralDiscreteScheduler
|
10 |
from huggingface_hub import hf_hub_download, InferenceClient
|
11 |
|
12 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
13 |
+
pipe = StableDiffusionXLPipeline.from_pretrained("fluently/Fluently-XL-Final", torch_dtype=torch.float16, vae=vae)
|
14 |
+
pipe.load_lora_weights("KingNish/Better-Image-XL-Lora", weight_name="example-03.safetensors", adapter_name="lora")
|
15 |
+
pipe.set_adapters("lora")
|
16 |
pipe.to("cuda")
|
17 |
|
18 |
+
refiner = StableDiffusionXLImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
|
19 |
refiner.to("cuda")
|
20 |
|
21 |
+
pipe_fast = StableDiffusionXLPipeline.from_pretrained("SG161222/RealVisXL_V4.0_Lightning", torch_dtype=torch.float16)
|
22 |
+
pipe_fast.scheduler = EulerAncestralDiscreteScheduler(pipe_fast.scheduler.config)
|
23 |
pipe_fast.to("cuda")
|
24 |
|
25 |
help_text = """
|