Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -127,7 +127,6 @@ def load_and_prepare_model():
|
|
127 |
#'John6666/uber-realistic-porn-merge-xl-urpmxl-v6final-sdxl',
|
128 |
#torch_dtype=torch.bfloat16,
|
129 |
add_watermarker=False,
|
130 |
-
low_cpu_mem_usage = False,
|
131 |
token=HF_TOKEN,
|
132 |
# custom_pipeline="lpw_stable_diffusion_xl",
|
133 |
#use_safetensors=True,
|
@@ -181,10 +180,13 @@ def load_and_prepare_model():
|
|
181 |
#pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
182 |
#pipe.scheduler=EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
|
183 |
# pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/Fantasy_World_XL.safetensors", adapter_name="fantasy")
|
184 |
-
pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/skin_texture_style_v4.safetensors", adapter_name="skin")
|
|
|
|
|
|
|
185 |
#pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/epicNewPhoto.safetensors", adapter_name="photo")
|
186 |
#pipe.set_adapters(["skin", "photo", "fantasy"], adapter_weights=[0.75, 0.25, 0.5])
|
187 |
-
pipe.set_adapters(["skin"], adapter_weights=[0.5])
|
188 |
|
189 |
pipe.to(device)
|
190 |
pipe.to(torch.bfloat16)
|
|
|
127 |
#'John6666/uber-realistic-porn-merge-xl-urpmxl-v6final-sdxl',
|
128 |
#torch_dtype=torch.bfloat16,
|
129 |
add_watermarker=False,
|
|
|
130 |
token=HF_TOKEN,
|
131 |
# custom_pipeline="lpw_stable_diffusion_xl",
|
132 |
#use_safetensors=True,
|
|
|
180 |
#pipe.scheduler=EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear", beta_start=0.00085, beta_end=0.012, steps_offset=1)
|
181 |
#pipe.scheduler=EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', subfolder='scheduler',beta_schedule="scaled_linear")
|
182 |
# pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/Fantasy_World_XL.safetensors", adapter_name="fantasy")
|
183 |
+
#pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/skin_texture_style_v4.safetensors", adapter_name="skin")
|
184 |
+
pipe.unet.load_lora_adapter("ford442/sdxl-vae-bf16", weight_name="LoRA/skin_texture_style_v4.safetensors", prefix="unet")
|
185 |
+
pipe.text_encoder.load_lora_adapter("ford442/sdxl-vae-bf16", weight_name="LoRA/skin_texture_style_v4.safetensors", prefix="text_encoder")
|
186 |
+
|
187 |
#pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/epicNewPhoto.safetensors", adapter_name="photo")
|
188 |
#pipe.set_adapters(["skin", "photo", "fantasy"], adapter_weights=[0.75, 0.25, 0.5])
|
189 |
+
#pipe.set_adapters(["skin"], adapter_weights=[0.5])
|
190 |
|
191 |
pipe.to(device)
|
192 |
pipe.to(torch.bfloat16)
|