Spaces:
Sleeping
Sleeping
исправляем ошибку устанорвки lora_scale - меняем на параметр "cross_attention_kwargs"
Browse files101 unmodified lines10210310410510510610710810911011 unmodified lines122123124125126127128101 unmodified lines pipe.unet = PeftModel.from_pretrained(pipe.unet, unet_sub_dir) #pipe.text_encoder = PeftModel.from_pretrained(pipe.text_encoder, text_encoder_sub_dir)
# исправляем ошибку устанорвки lora_scale - меняем на параметр "cross_attention_kwargs" pipe.unet.load_state_dict({k: lora_scale*v for k, v in pipe.unet.state_dict().items()}) # pipe.unet.load_state_dict({k: lora_scale*v for k, v in pipe.unet.state_dict().items()}) params['cross_attention_kwargs'] = {"scale": float(lora_scale)} #pipe.text_encoder.load_state_dict({k: lora_scale*v for k, v in pipe.text_encoder.state_dict().items()}) if torch_dtype in (torch.float16, torch.bfloat16):11 unmodified lines
examples = [ "Puss in Boots wearing a sombrero crosses the Grand Canyon on a tightrope with a guitar.", "Cat wearing a sombrero crosses the Grand Canyon on a tightrope with a guitar.", "A cat is playing a song called ""About the Cat"" on an accordion by the sea at sunset. The sun is quickly setting behind the horizon, and the light is fading.", "A cat walks through the grass on the streets of an abandoned city. The camera view is always focused on the cat's face.", "A young lady in a Russian embroidered kaftan is sitting on a beautiful carved veranda, holding a cup to her mouth and drinking tea from the cup. With her other hand, the girl holds a saucer. The cup and saucer are painted with gzhel. Next to the girl on the table stands a samovar, and steam can be seen above it.",app_old.py → app.pyRenamed+4-1