LPX55 commited on
Commit
5fc685b
·
verified ·
1 Parent(s): df5e19a

Update raw.py

Browse files
Files changed (1) hide show
  1. raw.py +11 -0
raw.py CHANGED
@@ -20,7 +20,18 @@ pipe = FluxControlNetPipeline.from_pretrained(
20
  vae=good_vae,
21
  token=huggingface_token
22
  )
 
 
 
23
  pipe.to("cuda")
 
 
 
 
 
 
 
 
24
 
25
  @spaces.GPU
26
  def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale):
 
20
  vae=good_vae,
21
  token=huggingface_token
22
  )
23
+ adapter_id = "alimama-creative/FLUX.1-Turbo-Alpha"
24
+ adapter_id2 = "XLabs-AI/flux-RealismLora"
25
+
26
  pipe.to("cuda")
27
+ pipe.load_lora_weights(adapter_id, adapter_name="turbo")
28
+ pipe.load_lora_weights(adapter_id2, adapter_name="real")
29
+ pipe.set_adapters(["turbo", "real"], adapter_weights=[0.9, 0.6])
30
+ pipe.fuse_lora(adapter_names=["turbo", "real"], lora_scale=1.0)
31
+ pipe.unload_lora_weights()
32
+
33
+ # save to the Hub
34
+ # pipe.push_to_hub("fused-t-r")
35
 
36
  @spaces.GPU
37
  def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale):