update omost (#190)

* update omost
This commit is contained in:
ZhouTianchen
2024-09-09 17:39:46 +08:00
committed by GitHub
parent 1887885274
commit 995f3374f1
5 changed files with 55 additions and 29 deletions

View File

@@ -14,11 +14,22 @@ model_manager.load_models([
"models/FLUX/FLUX.1-dev/flux1-dev.safetensors"
])
pipe = FluxImagePipeline.from_model_manager(model_manager, prompt_extender_classes=[OmostPromter])
pipe_omost = FluxImagePipeline.from_model_manager(model_manager, prompt_extender_classes=[OmostPromter])
pipe = FluxImagePipeline.from_model_manager(model_manager)
torch.manual_seed(0)
image = pipe(
prompt="an image of a witch who is releasing ice and fire magic",
prompt = "A witch uses ice magic to fight against wild beasts"
seed = 7
torch.manual_seed(seed)
image = pipe_omost(
prompt=prompt,
num_inference_steps=30, embedded_guidance=3.5
)
image.save("image_omost.jpg")
image.save(f"image_omost.jpg")
torch.manual_seed(seed)
image2= pipe(
prompt=prompt,
num_inference_steps=30, embedded_guidance=3.5
)
image2.save(f"image.jpg")