Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- app.py +2 -11
- requirements.txt +2 -1
app.py
CHANGED
@@ -5,9 +5,7 @@ import logging
|
|
5 |
import torch
|
6 |
from PIL import Image
|
7 |
from diffusers import DiffusionPipeline
|
8 |
-
from diffusers
|
9 |
-
from diffusers.models.controlnet_flux import FluxControlNetModel, FluxMultiControlNetModel
|
10 |
-
#from diffusers import FluxControlNetPipeline, FluxControlNetModel, FluxMultiControlNetModel
|
11 |
from huggingface_hub import hf_hub_download, HfFileSystem, ModelCard, snapshot_download
|
12 |
import copy
|
13 |
import random
|
@@ -332,26 +330,20 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=css) as app:
|
|
332 |
deselect_lora_button = gr.Button("Deselect LoRA", variant="secondary")
|
333 |
with gr.Column(scale=4):
|
334 |
result = gr.Image(label="Generated Image", format="png", show_share_button=False)
|
335 |
-
|
336 |
with gr.Row():
|
337 |
with gr.Accordion("Advanced Settings", open=False):
|
338 |
with gr.Column():
|
339 |
-
with gr.Row():
|
340 |
-
model_name = gr.Dropdown(label="Base Model", info="You can enter a huggingface model repo_id to want to use.", choices=models, value=models[0], allow_custom_value=True)
|
341 |
-
|
342 |
with gr.Row():
|
343 |
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, step=0.5, value=3.5)
|
344 |
steps = gr.Slider(label="Steps", minimum=1, maximum=50, step=1, value=28)
|
345 |
-
|
346 |
with gr.Row():
|
347 |
width = gr.Slider(label="Width", minimum=256, maximum=1536, step=64, value=1024)
|
348 |
height = gr.Slider(label="Height", minimum=256, maximum=1536, step=64, value=1024)
|
349 |
-
|
350 |
with gr.Row():
|
351 |
randomize_seed = gr.Checkbox(True, label="Randomize seed")
|
352 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
353 |
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=1, step=0.01, value=0.95)
|
354 |
-
|
355 |
with gr.Accordion("External LoRA", open=True):
|
356 |
with gr.Column():
|
357 |
lora_repo_json = gr.JSON(value=[{}] * num_loras, visible=False)
|
@@ -388,7 +380,6 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=css) as app:
|
|
388 |
lora_download = [None] * num_loras
|
389 |
for i in range(num_loras):
|
390 |
lora_download[i] = gr.Button(f"Get and set LoRA to {int(i+1)}")
|
391 |
-
|
392 |
with gr.Accordion("ControlNet", open=False):
|
393 |
with gr.Column():
|
394 |
cn_on = gr.Checkbox(False, label="Use ControlNet")
|
|
|
5 |
import torch
|
6 |
from PIL import Image
|
7 |
from diffusers import DiffusionPipeline
|
8 |
+
from diffusers import FluxControlNetPipeline, FluxControlNetModel, FluxMultiControlNetModel
|
|
|
|
|
9 |
from huggingface_hub import hf_hub_download, HfFileSystem, ModelCard, snapshot_download
|
10 |
import copy
|
11 |
import random
|
|
|
330 |
deselect_lora_button = gr.Button("Deselect LoRA", variant="secondary")
|
331 |
with gr.Column(scale=4):
|
332 |
result = gr.Image(label="Generated Image", format="png", show_share_button=False)
|
333 |
+
model_name = gr.Dropdown(label="Base Model", info="You can enter a huggingface model repo_id to want to use.", choices=models, value=models[0], allow_custom_value=True)
|
334 |
with gr.Row():
|
335 |
with gr.Accordion("Advanced Settings", open=False):
|
336 |
with gr.Column():
|
|
|
|
|
|
|
337 |
with gr.Row():
|
338 |
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, step=0.5, value=3.5)
|
339 |
steps = gr.Slider(label="Steps", minimum=1, maximum=50, step=1, value=28)
|
|
|
340 |
with gr.Row():
|
341 |
width = gr.Slider(label="Width", minimum=256, maximum=1536, step=64, value=1024)
|
342 |
height = gr.Slider(label="Height", minimum=256, maximum=1536, step=64, value=1024)
|
|
|
343 |
with gr.Row():
|
344 |
randomize_seed = gr.Checkbox(True, label="Randomize seed")
|
345 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
346 |
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=1, step=0.01, value=0.95)
|
|
|
347 |
with gr.Accordion("External LoRA", open=True):
|
348 |
with gr.Column():
|
349 |
lora_repo_json = gr.JSON(value=[{}] * num_loras, visible=False)
|
|
|
380 |
lora_download = [None] * num_loras
|
381 |
for i in range(num_loras):
|
382 |
lora_download[i] = gr.Button(f"Get and set LoRA to {int(i+1)}")
|
|
|
383 |
with gr.Accordion("ControlNet", open=False):
|
384 |
with gr.Column():
|
385 |
cn_on = gr.Checkbox(False, label="Use ControlNet")
|
requirements.txt
CHANGED
@@ -11,4 +11,5 @@ timm
|
|
11 |
einops
|
12 |
controlnet-aux
|
13 |
kornia
|
14 |
-
numpy
|
|
|
|
11 |
einops
|
12 |
controlnet-aux
|
13 |
kornia
|
14 |
+
numpy
|
15 |
+
opencv-python
|