Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -179,6 +179,10 @@ def load_and_prepare_model():
|
|
179 |
#pipe.unet=pipeX.unet
|
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")
|
@@ -186,13 +190,7 @@ def load_and_prepare_model():
|
|
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)
|
193 |
-
|
194 |
-
#pipe.unet.set_default_attn_processor()
|
195 |
-
pipe.vae.set_default_attn_processor()
|
196 |
|
197 |
print(f'Pipeline: ')
|
198 |
#print(f'_optional_components: {pipe._optional_components}')
|
|
|
179 |
#pipe.unet=pipeX.unet
|
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 |
+
|
183 |
+
pipe.vae.set_default_attn_processor()
|
184 |
+
pipe.to(device)
|
185 |
+
pipe.to(torch.bfloat16)
|
186 |
# pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/Fantasy_World_XL.safetensors", adapter_name="fantasy")
|
187 |
pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/skin_texture_style_v4.safetensors", adapter_name="skin")
|
188 |
#pipe.unet.load_lora_adapter("ford442/sdxl-vae-bf16", weight_name="LoRA/skin_texture_style_v4.safetensors", prefix="unet")
|
|
|
190 |
|
191 |
#pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/epicNewPhoto.safetensors", adapter_name="photo")
|
192 |
#pipe.set_adapters(["skin", "photo", "fantasy"], adapter_weights=[0.75, 0.25, 0.5])
|
193 |
+
pipe.set_adapters(["skin"], adapter_weights=[0.5]) #pipe.unet.set_default_attn_processor()
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
print(f'Pipeline: ')
|
196 |
#print(f'_optional_components: {pipe._optional_components}')
|