Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ torch.backends.cuda.matmul.allow_tf32 = True
|
|
13 |
base_model = "black-forest-labs/FLUX.1-dev"
|
14 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
|
15 |
|
16 |
-
lora_repo = "
|
17 |
trigger_word = "" # Leave trigger_word blank if not used.
|
18 |
pipe.load_lora_weights(lora_repo)
|
19 |
|
@@ -55,11 +55,7 @@ def run_lora(prompt, cfg_scale, steps, randomize_seed, seed, width, height, lora
|
|
55 |
|
56 |
# Example cached image and settings
|
57 |
example_image_path = "example0.webp" # Replace with the actual path to the example image
|
58 |
-
example_prompt = """
|
59 |
-
|
60 |
-
The woman is wearing a colorful, patterned dress with a green lanyard featuring multiple badges and logos hanging around her neck. The lanyard prominently displays the "CagliostroLab" text.
|
61 |
-
|
62 |
-
Behind her, there is a blurred background with a white banner containing logos and text, indicating a professional or conference setting. The overall scene captures the energy and vibrancy of her presentation."""
|
63 |
example_cfg_scale = 3.2
|
64 |
example_steps = 32
|
65 |
example_width = 1152
|
@@ -87,7 +83,6 @@ with gr.Blocks() as app:
|
|
87 |
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=1, step=0.01, value=example_lora_scale)
|
88 |
with gr.Column(scale=1):
|
89 |
result = gr.Image(label="Generated Image")
|
90 |
-
gr.Markdown("Generate images using RealismLora and a text prompt.\n[[non-commercial license, Flux.1 Dev](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)]")
|
91 |
|
92 |
# Automatically load example data and image when the interface is launched
|
93 |
app.load(load_example, inputs=[], outputs=[prompt, cfg_scale, steps, randomize_seed, seed, width, height, lora_scale, result])
|
|
|
13 |
base_model = "black-forest-labs/FLUX.1-dev"
|
14 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
|
15 |
|
16 |
+
lora_repo = "strangerzonehf/Flux-Pixel-Background-LoRA"
|
17 |
trigger_word = "" # Leave trigger_word blank if not used.
|
18 |
pipe.load_lora_weights(lora_repo)
|
19 |
|
|
|
55 |
|
56 |
# Example cached image and settings
|
57 |
example_image_path = "example0.webp" # Replace with the actual path to the example image
|
58 |
+
example_prompt = """Pixel Background, a silhouette of a surfer is seen riding a wave on a red surfboard. The surfers shadow is cast on the left side of the image, adding a touch of depth to the composition. The background is a vibrant orange, pink, and blue, with a sun setting in the upper right corner of the frame. The silhouette of the surfer, a palm tree casts a shadow onto the wave, adding depth and contrast to the scene."""
|
|
|
|
|
|
|
|
|
59 |
example_cfg_scale = 3.2
|
60 |
example_steps = 32
|
61 |
example_width = 1152
|
|
|
83 |
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=1, step=0.01, value=example_lora_scale)
|
84 |
with gr.Column(scale=1):
|
85 |
result = gr.Image(label="Generated Image")
|
|
|
86 |
|
87 |
# Automatically load example data and image when the interface is launched
|
88 |
app.load(load_example, inputs=[], outputs=[prompt, cfg_scale, steps, randomize_seed, seed, width, height, lora_scale, result])
|