Spaces:
Runtime error
Runtime error
Commit
Β·
8b41214
1
Parent(s):
2154274
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ from typing import Optional
|
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
from PIL import Image
|
|
|
|
| 7 |
|
| 8 |
from appearance_transfer_model import AppearanceTransferModel
|
| 9 |
from run import run_appearance_transfer
|
|
@@ -48,6 +49,7 @@ def main_pipeline(app_image_path: str,
|
|
| 48 |
load_latents=False
|
| 49 |
)
|
| 50 |
print(config)
|
|
|
|
| 51 |
model = AppearanceTransferModel(config=config, pipe=pipe)
|
| 52 |
latents_app, latents_struct, noise_app, noise_struct = load_latents_or_invert_images(model=model, cfg=config)
|
| 53 |
model.set_latents(latents_app, latents_struct)
|
|
|
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
from PIL import Image
|
| 7 |
+
from diffusers.training_utils import set_seed
|
| 8 |
|
| 9 |
from appearance_transfer_model import AppearanceTransferModel
|
| 10 |
from run import run_appearance_transfer
|
|
|
|
| 49 |
load_latents=False
|
| 50 |
)
|
| 51 |
print(config)
|
| 52 |
+
set_seed(config.seed)
|
| 53 |
model = AppearanceTransferModel(config=config, pipe=pipe)
|
| 54 |
latents_app, latents_struct, noise_app, noise_struct = load_latents_or_invert_images(model=model, cfg=config)
|
| 55 |
model.set_latents(latents_app, latents_struct)
|