Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ from accelerate import Accelerator
|
|
6 |
from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler
|
7 |
accelerator = Accelerator(cpu=True)
|
8 |
|
9 |
-
pipe =
|
10 |
-
pipe
|
11 |
-
pipe
|
12 |
##pipe = accelerator.prepare(pipe.unet.load_attn_procs("./", weight_name="SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors"))
|
13 |
##pipe.scheduler = accelerator.prepare(EulerDiscreteScheduler.from_config(pipe.scheduler.config))
|
14 |
##pipe.unet.to(memory_format=torch.channels_last)
|
15 |
-
pipe.to("cpu")
|
16 |
apol=[]
|
17 |
def plex(prompt,neg_prompt,stips,nut):
|
18 |
apol=[]
|
|
|
6 |
from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler
|
7 |
accelerator = Accelerator(cpu=True)
|
8 |
|
9 |
+
pipe = StableDiffusionXLPipeline.from_single_file("https://huggingface.co/lllyasviel/fav_models/fav/realisticStockPhoto_v10.safetensors", torch_dtype=torch.bfloat16, use_safetensors=True, variant=None, safety_checker=False)
|
10 |
+
pipe.load_lora_weights("JoPmt/Txt2Img_Rlstc_Stck_Pht_Xl_Fused", weight_name="SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors", repo_type="space"))
|
11 |
+
pipe.fuse_lora(fuse_unet=True,fuse_text_encoder=False)
|
12 |
##pipe = accelerator.prepare(pipe.unet.load_attn_procs("./", weight_name="SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors"))
|
13 |
##pipe.scheduler = accelerator.prepare(EulerDiscreteScheduler.from_config(pipe.scheduler.config))
|
14 |
##pipe.unet.to(memory_format=torch.channels_last)
|
15 |
+
pipe=accelerator.prepare(pipe.to("cpu"))
|
16 |
apol=[]
|
17 |
def plex(prompt,neg_prompt,stips,nut):
|
18 |
apol=[]
|