Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,8 +53,8 @@ If you have any questions, please feel free to open an issue or directly reach u
|
|
| 53 |
|
| 54 |
|
| 55 |
model_num_of_layers = {
|
| 56 |
-
'Stable Diffusion 1.4':
|
| 57 |
-
'Stable Diffusion 2.1':
|
| 58 |
}
|
| 59 |
|
| 60 |
# def run_for_examples(prompt, model, seed, skip):
|
|
@@ -69,7 +69,7 @@ def generate_images(prompt, model, seed, skip):
|
|
| 69 |
max_num_of_layers = model_num_of_layers[model]
|
| 70 |
start_layer = max_num_of_layers % skip
|
| 71 |
|
| 72 |
-
for skip_layers in range(max_num_of_layers - start_layer
|
| 73 |
# Pass the model and seed to the get_images function
|
| 74 |
images = get_images(prompt, skip_layers=skip_layers, model=model, seed=seed)
|
| 75 |
all_images.append((images[0], f'layer_{max_num_of_layers - skip_layers}'))
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
model_num_of_layers = {
|
| 56 |
+
'Stable Diffusion 1.4': 13,
|
| 57 |
+
'Stable Diffusion 2.1': 23,
|
| 58 |
}
|
| 59 |
|
| 60 |
# def run_for_examples(prompt, model, seed, skip):
|
|
|
|
| 69 |
max_num_of_layers = model_num_of_layers[model]
|
| 70 |
start_layer = max_num_of_layers % skip
|
| 71 |
|
| 72 |
+
for skip_layers in range(max_num_of_layers - start_layer, -1, -1 * skip):
|
| 73 |
# Pass the model and seed to the get_images function
|
| 74 |
images = get_images(prompt, skip_layers=skip_layers, model=model, seed=seed)
|
| 75 |
all_images.append((images[0], f'layer_{max_num_of_layers - skip_layers}'))
|