Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def generate(
|
|
56 |
apply_refiner: bool = False,
|
57 |
model = 'SG161222/Realistic_Vision_V6.0_B1_noVAE',
|
58 |
vaecall = 'stabilityai/sd-vae-ft-mse',
|
59 |
-
lora = '
|
60 |
lora_scale: float = 0.7,
|
61 |
):
|
62 |
if torch.cuda.is_available():
|
@@ -72,10 +72,11 @@ def generate(
|
|
72 |
pipe.load_lora_weights(lora)
|
73 |
pipe.fuse_lora(lora_scale=0.7)
|
74 |
|
75 |
-
url =
|
76 |
response = requests.get(url)
|
77 |
init_image = Image.open(BytesIO(response.content)).convert("RGB")
|
78 |
init_image = init_image.resize((1024, 1024))
|
|
|
79 |
|
80 |
if ENABLE_CPU_OFFLOAD:
|
81 |
pipe.enable_model_cpu_offload()
|
|
|
56 |
apply_refiner: bool = False,
|
57 |
model = 'SG161222/Realistic_Vision_V6.0_B1_noVAE',
|
58 |
vaecall = 'stabilityai/sd-vae-ft-mse',
|
59 |
+
lora = 'amazonaws-la/juliette',
|
60 |
lora_scale: float = 0.7,
|
61 |
):
|
62 |
if torch.cuda.is_available():
|
|
|
72 |
pipe.load_lora_weights(lora)
|
73 |
pipe.fuse_lora(lora_scale=0.7)
|
74 |
|
75 |
+
url = "https://m.media-amazon.com/images/I/81zPcrN6m+L.jpg"
|
76 |
response = requests.get(url)
|
77 |
init_image = Image.open(BytesIO(response.content)).convert("RGB")
|
78 |
init_image = init_image.resize((1024, 1024))
|
79 |
+
init_image.save('source.png')
|
80 |
|
81 |
if ENABLE_CPU_OFFLOAD:
|
82 |
pipe.enable_model_cpu_offload()
|