Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
43221fb
1
Parent(s):
3fd5bc5
22
Browse files- app.py +2 -0
- utils/prompt_utils.py +1 -1
app.py
CHANGED
|
@@ -79,6 +79,8 @@ spaces.aoti_blocks_load(pipe.transformer.layers,
|
|
| 79 |
def prepare(prompt, input_image, control_mode='Canny'):
|
| 80 |
polished_prompt = polish_prompt(prompt)
|
| 81 |
|
|
|
|
|
|
|
| 82 |
if control_mode == 'HED':
|
| 83 |
processor = HEDdetector.from_pretrained("lllyasviel/Annotators")
|
| 84 |
if control_mode =='Midas':
|
|
|
|
| 79 |
def prepare(prompt, input_image, control_mode='Canny'):
|
| 80 |
polished_prompt = polish_prompt(prompt)
|
| 81 |
|
| 82 |
+
if not input_image: return polished_prompt
|
| 83 |
+
|
| 84 |
if control_mode == 'HED':
|
| 85 |
processor = HEDdetector.from_pretrained("lllyasviel/Annotators")
|
| 86 |
if control_mode =='Midas':
|
utils/prompt_utils.py
CHANGED
|
@@ -18,7 +18,7 @@ def polish_prompt(original_prompt):
|
|
| 18 |
|
| 19 |
try:
|
| 20 |
completion = client.chat.completions.create(
|
| 21 |
-
|
| 22 |
api_key=api_key,
|
| 23 |
model="Qwen/Qwen3-235B-A22B-Instruct-2507",
|
| 24 |
messages=[
|
|
|
|
| 18 |
|
| 19 |
try:
|
| 20 |
completion = client.chat.completions.create(
|
| 21 |
+
provider="cerebras",
|
| 22 |
api_key=api_key,
|
| 23 |
model="Qwen/Qwen3-235B-A22B-Instruct-2507",
|
| 24 |
messages=[
|