Spaces:
Running
on
Zero
Running
on
Zero
NikhilJoson
commited on
Commit
•
abf5a91
1
Parent(s):
558080e
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ DEVICE = "cuda" #if torch.cuda.is_available() else "cpu"
|
|
52 |
#Setting up Flux (Schnell) Inpainting, with Realism LoRA weights
|
53 |
inpaint_pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
|
54 |
inpaint_pipe.load_lora_weights('hugovntr/flux-schnell-realism', weight_name='schnell-realism_v2.3.safetensors', adapter_name="better")
|
55 |
-
inpaint_pipe.set_adapters(["better"], adapter_weights=[
|
56 |
inpaint_pipe.fuse_lora(adapter_name=["better"], lora_scale=1.0)
|
57 |
inpaint_pipe.unload_lora_weights()
|
58 |
|
@@ -82,7 +82,7 @@ def process(input_image_editor, mask_image, input_text, strength, seed, randomiz
|
|
82 |
|
83 |
return result, mask_image, seed, item
|
84 |
|
85 |
-
with gr.Blocks(theme=
|
86 |
gr.Markdown(MARKDOWN)
|
87 |
with gr.Row():
|
88 |
with gr.Column(scale=1):
|
|
|
52 |
#Setting up Flux (Schnell) Inpainting, with Realism LoRA weights
|
53 |
inpaint_pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
|
54 |
inpaint_pipe.load_lora_weights('hugovntr/flux-schnell-realism', weight_name='schnell-realism_v2.3.safetensors', adapter_name="better")
|
55 |
+
inpaint_pipe.set_adapters(["better"], adapter_weights=[2.6])
|
56 |
inpaint_pipe.fuse_lora(adapter_name=["better"], lora_scale=1.0)
|
57 |
inpaint_pipe.unload_lora_weights()
|
58 |
|
|
|
82 |
|
83 |
return result, mask_image, seed, item
|
84 |
|
85 |
+
with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
86 |
gr.Markdown(MARKDOWN)
|
87 |
with gr.Row():
|
88 |
with gr.Column(scale=1):
|