Load local hugging face packages for assistant adapter
This commit is contained in:
@@ -504,8 +504,11 @@ class StableDiffusion:
|
|||||||
if not self.is_flux:
|
if not self.is_flux:
|
||||||
raise ValueError("Assistant lora is only supported for flux models currently")
|
raise ValueError("Assistant lora is only supported for flux models currently")
|
||||||
|
|
||||||
# handle downloading from the hub if needed
|
if os.path.isdir(self.model_config.assistant_lora_path):
|
||||||
if not os.path.exists(self.model_config.assistant_lora_path):
|
self.model_config.assistant_lora_path = os.path.join(
|
||||||
|
self.model_config.assistant_lora_path, "pytorch_lora_weights.safetensors"
|
||||||
|
)
|
||||||
|
elif not os.path.exists(self.model_config.assistant_lora_path):
|
||||||
print(f"Grabbing assistant lora from the hub: {self.model_config.assistant_lora_path}")
|
print(f"Grabbing assistant lora from the hub: {self.model_config.assistant_lora_path}")
|
||||||
new_lora_path = hf_hub_download(
|
new_lora_path = hf_hub_download(
|
||||||
self.model_config.assistant_lora_path,
|
self.model_config.assistant_lora_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user