File size: 3,090 Bytes
e233a0f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
tags:
- text-to-image
- stable-diffusion
- lora
- diffusers
- template:sd-lora
widget:
- text: Inference with 2 steps
  output:
    url: images/result_2steps.png
- text: Inference with 4 steps
  output:
    url: images/result_4steps.png
- text: Inference with 8 steps
  output:
    url: images/result_8steps.png
base_model: Lykon/dreamshaper-7
instance_prompt: tscd, hypersd
license: mit
---
# TSCD-Dreamshaper-7

<Gallery />

## Model description 

Fine-tune a distill LoRA version of [Lykon&#x2F;dreamshaper-7](https:&#x2F;&#x2F;huggingface.co&#x2F;Lykon&#x2F;dreamshaper-7) using Time Segmented Consistency Model (TSCD) introduce in [Hyper-SD: Trajectory Segmented Consistency Model for
Efficient Image Synthesis](https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2404.13686)

This LoRA is fine-tuned on [laion&#x2F;conceptual-captions-12m-webdataset](https:&#x2F;&#x2F;huggingface.co&#x2F;datasets&#x2F;laion&#x2F;conceptual-captions-12m-webdataset) for 16.000 iterations using unofficial training implementation at [https:&#x2F;&#x2F;github.com&#x2F;rootonchair&#x2F;consistency_models_distill]()

# Usage
&#x60;&#x60;&#x60;python
import os
import torch
from diffusers import StableDiffusionPipeline, TCDScheduler

pipeline &#x3D; StableDiffusionPipeline.from_pretrained(&quot;Lykon&#x2F;dreamshaper-7&quot;, torch_dtype&#x3D;torch.float16, safety_checker &#x3D; None).to(&quot;cuda&quot;)
pipeline.load_lora_weights(&quot;rootonchair&#x2F;tscd-dreamshaper-7&quot;)
pipeline.scheduler &#x3D; TCDScheduler.from_config(pipeline.scheduler.config)
test_prompts &#x3D; [
        &quot;cgmech, white mecha robot, cape, science fiction, torn clothes, glowing, standing, robot joints, mecha, armor, cowboy shot, intense sunlight, silver dragonborn, outdoors, landscape, nature, volumetrics dtx&quot;,
        &quot;Portrait photo of muscular bearded guy in a worn mech suit, elegant, sharp focus, photo by greg rutkowski, soft lighting, vibrant colors&quot;,
        &quot;photo of a supercar, 8k uhd, high quality, road, sunset, motion blur, depth blur, cinematic, filmic image 4k&quot;,
        &quot;a portrait of a white cat wearing glasses, highly detailed&quot;,
        &quot;a beautiful runrise at the beach, cinematic, masterpiece&quot;,
        &quot;A photo of beautiful mountain with realistic sunset and blue lake, highly detailed, masterpiece&quot;,
        &quot;Self-portrait oil painting, a beautiful cyborg with golden hair, 8k&quot;,
        &quot;Astronaut in a jungle, cold color palette, muted colors, detailed, 8k&quot;
    ]
seed &#x3D; 1234
images &#x3D; pipeline(test_prompts, width&#x3D;512, height&#x3D;512, num_inference_steps&#x3D;4, guidance_scale &#x3D; 0, generator&#x3D;torch.Generator(device&#x3D;&#39;cuda&#39;).manual_seed(seed)).images
&#x60;&#x60;&#x60;


## Trigger words

You should use `tscd` to trigger the image generation.

You should use `hypersd` to trigger the image generation.


## Download model

Weights for this model are available in Safetensors format.

[Download](/rootonchair/tscd-dreamshaper-7/tree/main) them in the Files & versions tab.