-
-
Save AlexeyLugovoy/e88dbded2e89ccfe20431fbaf3ad716f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from diffusers import AutoPipelineForImage2Image | |
CACHE_DIR = "." | |
DEVICE = "cuda:0" | |
pipe = AutoPipelineForImage2Image.from_pretrained( | |
"runwayml/stable-diffusion-v1-5", | |
torch_dtype=torch.float16, | |
variant="fp16", | |
use_safetensors=True, | |
cache_dir=CACHE_DIR | |
).to(DEVICE) | |
prompt = "New modern style of livingroom, warm color palette, detailed, 8k" | |
img_gen = pipe(prompt, image=img_pil.resize((512, 512)), strenght=0.7, num_inference_steps=100) | |
img_gen.images[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment