Skip to content

Comic generator that works using Stable Diffusion 1.5

Notifications You must be signed in to change notification settings

Friday202/ComicGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Comic Generator using Stable Diffusion

This is an application that you can run in an IDE to create custom comics using Stable Diffusion and pretrained model provaided by ogkalu.

Features

  • text2img Stable Diffusion pipeline for generating images based on positive and negative prompt.
  • img2img Stable Diffusion pipeline for generating images based on your simple painting as well as additional prompt to describe it.
  • inpainting Stable Diffusion pipeline for mostly adding and fixing elements of generated image (paint and prompt part of image to fix).
  • costum comic artstyle trained model provided by the user ogkalu on Huggingface.

Installation

Since everything works locally you have to firstly download inpainting and pretrained comic model for stable diffusion.

In main file you then have to set path at line 36:

pipelinePaint = StableDiffusionInpaintPipeline.from_pretrained(
        r"inpainintg_parent_folder", revision="fp16",
        torch_dtype=torch.float16)

and in modelID file set the comic path (example):

modelID = r"C:\Users\User\.cache\huggingface\diffusers\models--ogkalu--Comic-Diffusion\snapshots\b0f8b7655c342796dd3e25e2182f200919619e7c" 

Finally copy the unet folder from Comic to inpainting (replace).

Note that at least 8GB of VRAM is needed (supports only Nividia Cuda GPU) as well as torch compiled with cuda!

Aplication

Most things should be self explanatory. Know limitations are from pretrained model as well as consisterncy of charachters. I recommend prompting with known people like Jack Sparrow or John Wick to get some consistency. Comic is of size 3x4 (12 pictures) and can be exported as .pdf and printed in A4 format.

Look for inspiration on OpenArt for better prompting.

Results:

img2img:

Example use of simple drawing.

img3

Inpainting to fix/add elements to generated image:

As you can see from the image I have replaced the blue soldier's head as well as added blood to the body below.

fig5

Consistency of charachters:

Consistency of characters is achieved through proper prompting (i.e. by utilizing famous people and regenerating images with different prompts). If you want custom characters then additional training is needed which is currently not supported.

gifg

Generated comic in sloveninan:

GeneratedComic.pdf

Note

I am well aware that the application is not editor friendly for any modifications as it is all in one file.

About

Comic generator that works using Stable Diffusion 1.5

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages