Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,6 +62,8 @@ def download_file(url, folder_path, filename):
|
|
62 |
download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth?download=true", "models/upscalers/", "RealESRGAN_x2.pth")
|
63 |
download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth?download=true", "models/upscalers/", "RealESRGAN_x4.pth")
|
64 |
download_file("https://huggingface.co/silveroxides/sdxl_lowstep_beta_v1/resolve/main/pytorch_lora_weights.safetensors?download=true", "models/lora/", "LowStepBeta_v001.safetensors")
|
|
|
|
|
65 |
# Download the model files
|
66 |
ckpt_dir_realpony = snapshot_download(repo_id="silveroxides/RNS_RealPonyV20")
|
67 |
ckpt_dir_noobai = snapshot_download(repo_id="silveroxides/NoobAI-XL-EPS-1.0-Vwe")
|
@@ -222,7 +224,7 @@ def generate_image(model_choice, additional_positive_prompt, additional_negative
|
|
222 |
pipe = pipe_hybridpony
|
223 |
|
224 |
if use_lowstep_lora:
|
225 |
-
pipe.
|
226 |
|
227 |
if use_random_seed:
|
228 |
seed = random.randint(0, 2**32 - 1)
|
|
|
62 |
download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth?download=true", "models/upscalers/", "RealESRGAN_x2.pth")
|
63 |
download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth?download=true", "models/upscalers/", "RealESRGAN_x4.pth")
|
64 |
download_file("https://huggingface.co/silveroxides/sdxl_lowstep_beta_v1/resolve/main/pytorch_lora_weights.safetensors?download=true", "models/lora/", "LowStepBeta_v001.safetensors")
|
65 |
+
lora_model_path = "models/lora/LowStepBeta_v001.safetensors"
|
66 |
+
lora = torch.load(lora_model_path)
|
67 |
# Download the model files
|
68 |
ckpt_dir_realpony = snapshot_download(repo_id="silveroxides/RNS_RealPonyV20")
|
69 |
ckpt_dir_noobai = snapshot_download(repo_id="silveroxides/NoobAI-XL-EPS-1.0-Vwe")
|
|
|
224 |
pipe = pipe_hybridpony
|
225 |
|
226 |
if use_lowstep_lora:
|
227 |
+
pipe.unet.load_attn_procs(lora)
|
228 |
|
229 |
if use_random_seed:
|
230 |
seed = random.randint(0, 2**32 - 1)
|