Spaces:
Running
on
Zero
Running
on
Zero
fallenshock
commited on
Commit
•
1160f0f
1
Parent(s):
5f92dc7
updated examples
Browse files
app.py
CHANGED
@@ -55,9 +55,9 @@ def get_examples():
|
|
55 |
["inputs/cat.png", "SD3", 50, 3.5, 13.5, 33, "a cat sitting in the grass", "a puppy sitting in the grass", 0, 1, 42],
|
56 |
["inputs/iguana.png", "SD3", 50, 3.5, 13.5, 31, "A large orange lizard sitting on a rock near the ocean. The lizard is positioned in the center of the scene, with the ocean waves visible in the background. The rock is located close to the water, providing a picturesque setting for the lizard''s resting spot.", "A large dragon sitting on a rock near the ocean. The dragon is positioned in the center of the scene, with the ocean waves visible in the background. The rock is located close to the water, providing a picturesque setting for the dragon''s resting spot.", 0, 1, 42],
|
57 |
["inputs/cat.png", "FLUX", 28, 1.5, 5.5, 24, "a cat sitting in the grass", "a puppy sitting in the grass", 0, 1, 42],
|
58 |
-
["inputs/gas_station.png", "FLUX", 28, 1.5, 5.5,
|
59 |
["inputs/steak.png", "FLUX", 28, 1.5, 5.5, 24, "A steak accompanied by a side of leaf salad.", "A bread roll accompanied by a side of leaf salad.", 0, 1, 42],
|
60 |
-
["inputs/kill_bill.png", "FLUX", 28, 2.5, 6.5,
|
61 |
|
62 |
]
|
63 |
return case
|
@@ -76,36 +76,9 @@ def FlowEditRun(
|
|
76 |
n_min: int,
|
77 |
n_avg: int,
|
78 |
seed: int,
|
79 |
-
# oauth_token: Optional[gr.OAuthToken] = None
|
80 |
|
81 |
):
|
82 |
|
83 |
-
# if oauth_token is None:
|
84 |
-
# raise gr.Error("You must be logged in to use Stable Diffusion 3.0 and FLUX.1 models.")
|
85 |
-
# if model_type == 'SD3':
|
86 |
-
# try:
|
87 |
-
# print(f'token: {oauth_token.token}')
|
88 |
-
# huggingface_hub.get_hf_file_metadata(huggingface_hub.hf_hub_url(SD3STRING, 'transformer/diffusion_pytorch_model.safetensors'),
|
89 |
-
# token=oauth_token.token)
|
90 |
-
# print('Has Access')
|
91 |
-
# # except huggingface_hub.utils._errors.GatedRepoError:
|
92 |
-
# except huggingface_hub.errors.GatedRepoError:
|
93 |
-
# raise gr.Error("You need to accept the license agreement to use Stable Diffusion 3. "
|
94 |
-
# "Visit the <a href='https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers'>"
|
95 |
-
# "model page</a> to get access.")
|
96 |
-
# elif model_type == 'FLUX':
|
97 |
-
# try:
|
98 |
-
# huggingface_hub.get_hf_file_metadata(huggingface_hub.hf_hub_url(FLUXSTRING, 'flux1-dev.safetensors'),
|
99 |
-
# token=oauth_token.token)
|
100 |
-
# print('Has Access')
|
101 |
-
# # except huggingface_hub.utils._errors.GatedRepoError:
|
102 |
-
# except huggingface_hub.errors.GatedRepoError:
|
103 |
-
# raise gr.Error("You need to accept the license agreement to use FLUX.1. "
|
104 |
-
# "Visit the <a href='https://huggingface.co/black-forest-labs/FLUX.1-dev'>"
|
105 |
-
# "model page</a> to get access.")
|
106 |
-
# else:
|
107 |
-
# raise NotImplementedError(f"Model type {model_type} not implemented")
|
108 |
-
|
109 |
if not len(src_prompt):
|
110 |
raise gr.Error("source prompt cannot be empty")
|
111 |
if not len(tar_prompt):
|
|
|
55 |
["inputs/cat.png", "SD3", 50, 3.5, 13.5, 33, "a cat sitting in the grass", "a puppy sitting in the grass", 0, 1, 42],
|
56 |
["inputs/iguana.png", "SD3", 50, 3.5, 13.5, 31, "A large orange lizard sitting on a rock near the ocean. The lizard is positioned in the center of the scene, with the ocean waves visible in the background. The rock is located close to the water, providing a picturesque setting for the lizard''s resting spot.", "A large dragon sitting on a rock near the ocean. The dragon is positioned in the center of the scene, with the ocean waves visible in the background. The rock is located close to the water, providing a picturesque setting for the dragon''s resting spot.", 0, 1, 42],
|
57 |
["inputs/cat.png", "FLUX", 28, 1.5, 5.5, 24, "a cat sitting in the grass", "a puppy sitting in the grass", 0, 1, 42],
|
58 |
+
["inputs/gas_station.png", "FLUX", 28, 1.5, 5.5, 23, "A gas station with a white and red sign that reads \"CAFE\" There are several cars parked in front of the gas station, including a white car and a van." "A gas station with a white and red sign that reads \"CVPR\" There are several cars parked in front of the gas station, including a white car and a van.", 0, 1, 42],
|
59 |
["inputs/steak.png", "FLUX", 28, 1.5, 5.5, 24, "A steak accompanied by a side of leaf salad.", "A bread roll accompanied by a side of leaf salad.", 0, 1, 42],
|
60 |
+
["inputs/kill_bill.png", "FLUX", 28, 2.5, 6.5, 22, "a blonde woman in a yellow jumpsuit holding a sword in front of her face", "a blonde woman in a yellow jumpsuit holding a sword in front of her face, anime style drawing", 14, 1, 42],
|
61 |
|
62 |
]
|
63 |
return case
|
|
|
76 |
n_min: int,
|
77 |
n_avg: int,
|
78 |
seed: int,
|
|
|
79 |
|
80 |
):
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
if not len(src_prompt):
|
83 |
raise gr.Error("source prompt cannot be empty")
|
84 |
if not len(tar_prompt):
|