@@ -24,36 +24,6 @@ class FluxDevLora(BaseRequest):
2424 height : Optional [int ] = Field (default = 1024 , description = "The height of the generated image." , ge = 512 , le = 1536 )
2525 strength : Optional [float ] = Field (default = 0.8 , description = "Strength indicates extent to transform the reference image" , maximum = 1 , minimum = 0 )
2626
27- def __init__ (
28- self ,
29- prompt : str ,
30- enable_safety_checker : Optional [bool ] = True ,
31- guidance_scale : Optional [float ] = 3.5 ,
32- image : Optional [str ] = None ,
33- loras : Optional [List [Union [LoraWeightItem , Dict [str , Any ]]]] = None , # Allow dicts for easier init
34- mask_image : Optional [str ] = None ,
35- num_images : Optional [int ] = 1 ,
36- num_inference_steps : Optional [int ] = 28 ,
37- seed : Optional [int ] = - 1 ,
38- width : Optional [int ] = 1024 ,
39- height : Optional [int ] = 1024 ,
40- strength : Optional [float ] = 0.8 ,
41- ** kwargs ):
42- super ().__init__ (** kwargs )
43- self .prompt = prompt
44- self .enable_safety_checker = enable_safety_checker
45- self .guidance_scale = guidance_scale
46- self .image = image
47- if loras is not None :
48- self .loras = [LoraWeightItem (** lora ) if isinstance (lora , dict ) else lora for lora in loras ]
49- self .mask_image = mask_image
50- self .num_images = num_images
51- self .num_inference_steps = num_inference_steps
52- self .seed = seed
53- self .width = width
54- self .height = height
55- self .strength = strength
56-
5727 def build_payload (self ) -> dict :
5828 """Builds the request payload dictionary."""
5929 payload = {
0 commit comments