Open sabetAI opened 1 year ago
I'm trying to run inject_trainable_lora_extended on a UNet2DConditionModel, with Conv2d as the target module:
inject_trainable_lora_extended
UNet2DConditionModel
Conv2d
from lora_diffusion.lora import inject_trainable_lora_extended rank = 4 unet = UNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="unet", torch_dtype=torch.float16, ) unet_lora_params, _ = inject_trainable_lora_extended( unet, target_replace_module=["Conv2d"], r=rank, ) unet_lora_params
I get the following error however: RecursionError: maximum recursion depth exceeded while calling a Python object.
RecursionError: maximum recursion depth exceeded while calling a Python object
Best to reimplement as a for loop to avoid recursion depth bug?
I'm trying to run
inject_trainable_lora_extended
on aUNet2DConditionModel
, withConv2d
as the target module:I get the following error however:
RecursionError: maximum recursion depth exceeded while calling a Python object
.Best to reimplement as a for loop to avoid recursion depth bug?