ameerazam08 commited on
Commit
c07cc81
·
verified ·
1 Parent(s): 5bf7bea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -13,16 +13,16 @@ pipeline = FluxPipeline.from_pretrained(
13
  torch_dtype=torch.bfloat16,
14
  ).to('cuda')
15
 
 
 
 
16
 
17
  @spaces.GPU
18
  def generate_image(image, prompt, guidance_scale, num_steps, lora_name):
19
  # Load the model
20
 
21
  # Load and fuse base LoRA weights
22
- # pipeline.load_lora_weights("nicolaus-huang/PhotoDoodle", weight_name="pretrain.safetensors")
23
- # pipeline.fuse_lora()
24
- # pipeline.unload_lora_weights()
25
-
26
  # Load selected LoRA effect if not using the pretrained base model
27
  pipeline.load_lora_weights("nicolaus-huang/PhotoDoodle", weight_name=f"{lora_name}.safetensors")
28
  pipeline.fuse_lora()
 
13
  torch_dtype=torch.bfloat16,
14
  ).to('cuda')
15
 
16
+ pipeline.load_lora_weights("nicolaus-huang/PhotoDoodle", weight_name="pretrain.safetensors")
17
+ pipeline.fuse_lora()
18
+ pipeline.unload_lora_weights()
19
 
20
  @spaces.GPU
21
  def generate_image(image, prompt, guidance_scale, num_steps, lora_name):
22
  # Load the model
23
 
24
  # Load and fuse base LoRA weights
25
+
 
 
 
26
  # Load selected LoRA effect if not using the pretrained base model
27
  pipeline.load_lora_weights("nicolaus-huang/PhotoDoodle", weight_name=f"{lora_name}.safetensors")
28
  pipeline.fuse_lora()