Spaces:
Runtime error
Runtime error
bring back lora
Browse files
app.py
CHANGED
@@ -102,6 +102,9 @@ pipe = FluxInpaintPipeline.from_pretrained(bfl_repo, torch_dtype=torch.bfloat16)
|
|
102 |
MAX_SEED = np.iinfo(np.int32).max
|
103 |
TRIGGER = "a photo of TOK"
|
104 |
|
|
|
|
|
|
|
105 |
@spaces.GPU(duration=100)
|
106 |
def execute(image, prompt, debug=False):
|
107 |
if not prompt :
|
@@ -117,8 +120,7 @@ def execute(image, prompt, debug=False):
|
|
117 |
|
118 |
imgs = [ random_positioning(img), random_positioning(img)]
|
119 |
|
120 |
-
|
121 |
-
#pipe.load_lora_weights("XLabs-AI/flux-RealismLora", weight_name='lora.safetensors')
|
122 |
response = []
|
123 |
|
124 |
for image in range(len(imgs)):
|
@@ -145,7 +147,7 @@ def execute(image, prompt, debug=False):
|
|
145 |
generator=generator,
|
146 |
num_inference_steps=28,
|
147 |
max_sequence_length=256,
|
148 |
-
|
149 |
).images[0]
|
150 |
|
151 |
if debug:
|
|
|
102 |
MAX_SEED = np.iinfo(np.int32).max
|
103 |
TRIGGER = "a photo of TOK"
|
104 |
|
105 |
+
print(dir(pipe))
|
106 |
+
|
107 |
+
|
108 |
@spaces.GPU(duration=100)
|
109 |
def execute(image, prompt, debug=False):
|
110 |
if not prompt :
|
|
|
120 |
|
121 |
imgs = [ random_positioning(img), random_positioning(img)]
|
122 |
|
123 |
+
pipe.load_lora_weights("XLabs-AI/flux-RealismLora", weight_name='lora.safetensors')
|
|
|
124 |
response = []
|
125 |
|
126 |
for image in range(len(imgs)):
|
|
|
147 |
generator=generator,
|
148 |
num_inference_steps=28,
|
149 |
max_sequence_length=256,
|
150 |
+
joint_attention_kwargs={"scale": 0.9},
|
151 |
).images[0]
|
152 |
|
153 |
if debug:
|