GithubHelp home page GithubHelp logo

Comments (3)

yiyixuxu avatar yiyixuxu commented on June 8, 2024

can you provide a reproducible code example?

from diffusers.

JemiloII avatar JemiloII commented on June 8, 2024

I'm not sure why I even need to give an example when I pointed out that from_single_file is missing from the pipeline.

But from modifying a line in the example code here: https://huggingface.co/docs/diffusers/en/training/t2i_adapters

Using diffusers 0.27.2

from diffusers import StableDiffusionXLAdapterPipeline, T2IAdapter, EulerAncestralDiscreteSchedulerTest
from diffusers.utils import load_image
import torch

# modifed line below doesn't work, doesn't have this method like most of the other pipelines/etc
adapter = T2IAdapter.from_single_file("path/to/adapter.safetensors", torch_dtype=torch.float16)
pipeline = StableDiffusionXLAdapterPipeline.from_single_file(
    "path/to/model.safetensors", adapter=adapter, torch_dtype=torch.float16
)

pipeline.scheduler = EulerAncestralDiscreteSchedulerTest.from_config(pipe.scheduler.config)
pipeline.enable_xformers_memory_efficient_attention()
pipeline.enable_model_cpu_offload()

control_image = load_image("./conditioning_image_1.png")
prompt = "pale golden rod circle with old lace background"

generator = torch.manual_seed(0)
image = pipeline(
    prompt, image=control_image, generator=generator
).images[0]
image.save("./output.png")

from diffusers.

yiyixuxu avatar yiyixuxu commented on June 8, 2024

cc @DN6 here - do we plan to support T2IAdapter?

from diffusers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.