Update app.py
Browse files
app.py
CHANGED
|
@@ -71,7 +71,7 @@ def get_seed(seed):
|
|
| 71 |
@spaces.GPU(duration=60)
|
| 72 |
def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATIVE_INPUT, model=DEFAULT_MODEL, height=DEFAULT_HEIGHT, width=DEFAULT_WIDTH, steps=1, guidance=0, number=1, seed=None):
|
| 73 |
|
| 74 |
-
repo = repo_customs[model or "Default"]
|
| 75 |
filter_input = filter_input or ""
|
| 76 |
negative_input = negative_input or DEFAULT_NEGATIVE_INPUT
|
| 77 |
steps_set = steps
|
|
@@ -101,8 +101,10 @@ def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATI
|
|
| 101 |
guidance_set = 7
|
| 102 |
print("1")
|
| 103 |
repo.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
|
| 104 |
-
repo.set_adapters(["base"], adapter_weights=[0.7])
|
| 105 |
print(2)
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
if not steps:
|
| 108 |
steps = steps_set
|
|
|
|
| 71 |
@spaces.GPU(duration=60)
|
| 72 |
def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATIVE_INPUT, model=DEFAULT_MODEL, height=DEFAULT_HEIGHT, width=DEFAULT_WIDTH, steps=1, guidance=0, number=1, seed=None):
|
| 73 |
|
| 74 |
+
repo = repo_customs[model or "Default"]
|
| 75 |
filter_input = filter_input or ""
|
| 76 |
negative_input = negative_input or DEFAULT_NEGATIVE_INPUT
|
| 77 |
steps_set = steps
|
|
|
|
| 101 |
guidance_set = 7
|
| 102 |
print("1")
|
| 103 |
repo.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
|
|
|
|
| 104 |
print(2)
|
| 105 |
+
repo.set_adapters(["base"], adapter_weights=[0.7])
|
| 106 |
+
print(3)
|
| 107 |
+
repo.to(DEVICE)
|
| 108 |
|
| 109 |
if not steps:
|
| 110 |
steps = steps_set
|