silveroxides commited on
Commit
b8bca3f
·
verified ·
1 Parent(s): 6a73865

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -62,7 +62,7 @@ def download_file(url, folder_path, filename):
62
  # Download ESRGAN models
63
  download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth?download=true", "models/upscalers/", "RealESRGAN_x2.pth")
64
  download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth?download=true", "models/upscalers/", "RealESRGAN_x4.pth")
65
- download_file("https://huggingface.co/silveroxides/sdxl_lowstep_beta_v1/resolve/main/pytorch_lora_weights.safetensors?download=true", "models/lora/", "LowStepBeta_v001.safetensors")
66
  # Download the model files
67
  ckpt_dir_realpony = snapshot_download(repo_id="silveroxides/RNS_RealPonyV20")
68
  ckpt_dir_noobai = snapshot_download(repo_id="silveroxides/NoobAI-XL-EPS-1.0-Vwe")
@@ -126,8 +126,8 @@ DEFAULT_NEGATIVE_SUFFIX = "low quality, low resolution, simple background, bad c
126
  # Initialize Florence model
127
  device = "cuda" if torch.cuda.is_available() else "cpu"
128
 
129
- lora_model_path = "models/lora/LowStepBeta_v001.safetensors"
130
- lora = load_file(lora_model_path, device=device)
131
 
132
  #def load_models():
133
  #with patch("transformers.dynamic_module_utils.get_imports", fixed_get_imports):
@@ -227,7 +227,7 @@ def generate_image(model_choice, additional_positive_prompt, additional_negative
227
  pipe = pipe_hybridpony
228
 
229
  if use_lowstep_lora:
230
- pipe.unet.load_attn_procs(lora)
231
 
232
  if use_random_seed:
233
  seed = random.randint(0, 2**32 - 1)
 
62
  # Download ESRGAN models
63
  download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth?download=true", "models/upscalers/", "RealESRGAN_x2.pth")
64
  download_file("https://huggingface.co/ai-forever/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth?download=true", "models/upscalers/", "RealESRGAN_x4.pth")
65
+ # download_file("https://huggingface.co/silveroxides/sdxl_lowstep_beta_v1/resolve/main/pytorch_lora_weights.safetensors?download=true", "models/lora/", "LowStepBeta_v001.safetensors")
66
  # Download the model files
67
  ckpt_dir_realpony = snapshot_download(repo_id="silveroxides/RNS_RealPonyV20")
68
  ckpt_dir_noobai = snapshot_download(repo_id="silveroxides/NoobAI-XL-EPS-1.0-Vwe")
 
126
  # Initialize Florence model
127
  device = "cuda" if torch.cuda.is_available() else "cpu"
128
 
129
+ # lora_model_path = "models/lora/LowStepBeta_v001.safetensors"
130
+ # lora = load_file(lora_model_path, device=device)
131
 
132
  #def load_models():
133
  #with patch("transformers.dynamic_module_utils.get_imports", fixed_get_imports):
 
227
  pipe = pipe_hybridpony
228
 
229
  if use_lowstep_lora:
230
+ pipeline.unet.load_attn_procs("silveroxides/sdxl_lowstep_beta_v1", weight_name="pytorch_lora_weights.safetensors")
231
 
232
  if use_random_seed:
233
  seed = random.randint(0, 2**32 - 1)