Coder Social home page Coder Social logo

Comments (7)

ShenZhang-Shin avatar ShenZhang-Shin commented on July 19, 2024

I see, man. Could you let me know the resolution and model you are using?

from hidiffusion.

solitaryTian avatar solitaryTian commented on July 19, 2024

I see, man. Could you let me know the resolution and model you are using?

pretrain_model = "/dfs/comicai/zhiyuan.shi/models/stable-diffusion-v1-5"
h, w = 960, 512

the whole code is as follows:

from hidiffusion import apply_hidiffusion, remove_hidiffusion
from diffusers import DiffusionPipeline, DDIMScheduler, EulerAncestralDiscreteScheduler
import torch

pretrain_model = "/dfs/comicai/bin.hu/hub/darkSushiMixMix_225D"

pretrain_model = "/dfs/comicai/zhiyuan.shi/models/stable-diffusion-v1-5"
scheduler = EulerAncestralDiscreteScheduler.from_pretrained(pretrain_model, subfolder="scheduler")
pipe = DiffusionPipeline.from_pretrained(pretrain_model, scheduler = scheduler, torch_dtype=torch.float16, load_safety_checker=False).to("cuda")
pipe.safety_checker = None

# Optional. enable_xformers_memory_efficient_attention can save memory usage and increase inference speed. enable_model_cpu_offload and enable_vae_tiling can save memory usage.

pipe.enable_xformers_memory_efficient_attention()

pipe.enable_model_cpu_offload()

pipe.enable_vae_tiling()

Apply hidiffusion with a single line of code.

apply_hidiffusion(pipe)

prompt_list = [prompt1,prompt2,prompt3,prompt4,prompt5,prompt6,prompt7,prompt8,prompt9,prompt10,prompt11,prompt12,prompt13,prompt14,prompt15,prompt16,prompt17,prompt18]

seed=100
generator = torch.Generator(device=pipe.device).manual_seed(seed)
h, w = 960, 512
steps = 30
for i, prompt in enumerate(prompt_list):
image = pipe(prompt, guidance_scale=7.5, height=h, width=w, eta=1.0, generator=generator, num_inference_steps = steps).images[0]
image.save(f'pictures/h{h}w{w}{i}_seed{seed}_step{steps}.png')

from hidiffusion.

ShenZhang-Shin avatar ShenZhang-Shin commented on July 19, 2024

Ok, I will be going to reproduce the problem and fix it.

from hidiffusion.

solitaryTian avatar solitaryTian commented on July 19, 2024

Ok, I will be going to reproduce the problem and fix it.

I am very interested in this work. Have you reproduced this bug? Do you know the reason for the error and if there is any way to solve it?

from hidiffusion.

ShenZhang-Shin avatar ShenZhang-Shin commented on July 19, 2024

Problem solved. install the latest version
pip3 install hidiffusion==0.1.8
here is a 960x512 example with SD 1.5
ghibli style magical princess

from hidiffusion.

solitaryTian avatar solitaryTian commented on July 19, 2024

pip3 install hidiffusion==0.1.8

I have upgraded by 'pip install hidiffusion==0.1.8'. But I still get the same error

from hidiffusion.

ShenZhang-Shin avatar ShenZhang-Shin commented on July 19, 2024

I retest hidffusion==0.1.8 and it works fine for 960x512 resolution.
you might check your hidiffusion version,
pip3 show hidiffusion
image

and this my inference process
image

if hidiffusion==0.1.8 still gets the error. You can further check diffusers==0.27.0 or ==0.25.0

from hidiffusion.

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.