jina-ai / discoart

🪩 Create Disco Diffusion artworks in one line
Other
3.84k stars 249 forks source link

portrait_generator_v1.5 and portrait_generator_v001_ema_0.9999_1MM hard crash on WSL2 Windows 11 :( #133

Closed brokeDude2901 closed 2 years ago

brokeDude2901 commented 2 years ago

portrait_generator_v1.5 and portrait_generator_v001_ema_0.9999_1MM will hard crash system (no BSOD, just screen freeze and auto reset) on WSL2 Windows 11 (Xeon E5-2670v2 64GB RAM, RTX A5000 24GB). If use Google Colab GPU then things work normally.

Other diffusion_model will work just fine with WSL2. Also, specify "seed" parameter will throw error about int64 and float64 :(

discoart parameters

text_prompts = [ "Portrait of a Beautiful Fantasy Asian Woman in a Red Kimono, trending on ArtStation:5", 
                "Photorealistic, Detailed, Realism, Fantasy, Vulemetric Lighting, Global Illumination, Subsurface Scattering:2", 
                "Photographic Color Scheme",
                "blur, bokeh, dof:-1",
                "Red Light, Red Lighting, Red Environment:-2"]

c = Client(host=server_url)
n1 = c.post(
        "/create",
        parameters={
            "name_docarray": "test",
            "text_prompts": text_prompts,
            "n_batches": 1,
            "batch_size": 1,
            "steps": 250,
            "text_clip_on_cpu": True,
            "diffusion_model": "portrait_generator_v1.5",            
            "clip_guidance_scale" : 2000,
            "tv_scale" : 100,
            "range_scale" : 100,
            "sat_scale" : 0,
            "cutn_batches" : 1,
           # "init_image" : init_image,
            "init_scale" : 1000,                
            "skip_steps": 10,
            "perlin_init": False,
            "perlin_mode": "mixed",
            "skip_augs": False,
            "randomize_class": True,
            "clip_denoised": False,
            "clamp_grad": True,
            "clamp_max" : 0.05,
            #"seed" : 3138,
            "fuzzy_prompt" : False,
            "rand_mag" : 0.05 ,
            "eta" : 0.8,
            "use_secondary_model" : False,
            "diffusion_sampling_mode" : "ddim",
            "cut_overview" : "[12]*400+[4]*600",
            "cut_innercut" : "[12]*400+[4]*600",
            "cut_ic_pow" : "[0.05]*1000",
            "cut_icgray_p" : "[0.2]*400+[0]*600",
            "use_horizontal_symmetry" : False,
            "use_vertical_symmetry" : False,
            },
        )
hanxiao commented 2 years ago

portrait_generator_v1.5 and portrait_generator_v001_ema_0.9999_1MM will hard crash system (no BSOD, just screen freeze and auto reset) on WSL2 Windows 11 (Xeon E5-2670v2 64GB RAM, RTX A5000 24GB). If use Google Colab GPU then things work normally.

This is really strange. I don't have clue for the moment, will have to wait and get some ideas from community

hanxiao commented 2 years ago

Also, specify "seed" parameter will throw error about int64 and float64 :(

bug, fixing in the next release

brokeDude2901 commented 2 years ago

update: i try discoart on native Windows 11 (python3.10 from microsoft store and pip install discoart), everything works perfectly, no crash, so this is a pure issue with WSL2 kernel or nvidia driver thing.

brokeDude2901 commented 2 years ago

update: setting a fixed GPU clock speed will prevent Nvidia Driver crash on WSL2

nvidia-smi -lgc 1100