Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	
		ResearcherXman
		
	commited on
		
		
					Commit 
							
							·
						
						2767034
	
1
								Parent(s):
							
							1d422fe
								
add spring festival style
Browse files- .DS_Store +0 -0
- app.py +4 -2
- style_template.py +5 -0
    	
        .DS_Store
    DELETED
    
    | Binary file (6.15 kB) | 
|  | 
    	
        app.py
    CHANGED
    
    | @@ -36,7 +36,7 @@ MAX_SEED = np.iinfo(np.int32).max | |
| 36 | 
             
            device = "cuda" if torch.cuda.is_available() else "cpu"
         | 
| 37 | 
             
            dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
         | 
| 38 | 
             
            STYLE_NAMES = list(styles.keys())
         | 
| 39 | 
            -
            DEFAULT_STYLE_NAME = " | 
| 40 | 
             
            enable_lcm_arg = False
         | 
| 41 |  | 
| 42 | 
             
            # download checkpoints
         | 
| @@ -186,7 +186,7 @@ def get_example(): | |
| 186 | 
             
                        "./examples/yann-lecun_resize.jpg",
         | 
| 187 | 
             
                        None,
         | 
| 188 | 
             
                        "a man",
         | 
| 189 | 
            -
                        " | 
| 190 | 
             
                        "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
         | 
| 191 | 
             
                    ],
         | 
| 192 | 
             
                    [
         | 
| @@ -433,6 +433,8 @@ title = r""" | |
| 433 | 
             
            description = r"""
         | 
| 434 | 
             
            <b>Official 🤗 Gradio demo</b> for <a href='https://github.com/InstantID/InstantID' target='_blank'><b>InstantID: Zero-shot Identity-Preserving Generation in Seconds</b></a>.<br>
         | 
| 435 |  | 
|  | |
|  | |
| 436 | 
             
            How to use:<br>
         | 
| 437 | 
             
            1. Upload an image with a face. For images with multiple faces, we will only detect the largest face. Ensure the face is not too small and is clearly visible without significant obstructions or blurring.
         | 
| 438 | 
             
            2. (Optional) You can upload another image as a reference for the face pose. If you don't, we will use the first detected face image to extract facial landmarks. If you use a cropped face at step 1, it is recommended to upload it to define a new face pose.
         | 
|  | |
| 36 | 
             
            device = "cuda" if torch.cuda.is_available() else "cpu"
         | 
| 37 | 
             
            dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
         | 
| 38 | 
             
            STYLE_NAMES = list(styles.keys())
         | 
| 39 | 
            +
            DEFAULT_STYLE_NAME = "Spring Festival"
         | 
| 40 | 
             
            enable_lcm_arg = False
         | 
| 41 |  | 
| 42 | 
             
            # download checkpoints
         | 
|  | |
| 186 | 
             
                        "./examples/yann-lecun_resize.jpg",
         | 
| 187 | 
             
                        None,
         | 
| 188 | 
             
                        "a man",
         | 
| 189 | 
            +
                        "Spring Festival",
         | 
| 190 | 
             
                        "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
         | 
| 191 | 
             
                    ],
         | 
| 192 | 
             
                    [
         | 
|  | |
| 433 | 
             
            description = r"""
         | 
| 434 | 
             
            <b>Official 🤗 Gradio demo</b> for <a href='https://github.com/InstantID/InstantID' target='_blank'><b>InstantID: Zero-shot Identity-Preserving Generation in Seconds</b></a>.<br>
         | 
| 435 |  | 
| 436 | 
            +
            We are organizing a Spring Festival event with HuggingFace from 2.7 to 2.25, and you can now generate pictures of Spring Festival costumes. Happy Dragon Year 🐲 ! Share the joy with your family.<br>
         | 
| 437 | 
            +
             | 
| 438 | 
             
            How to use:<br>
         | 
| 439 | 
             
            1. Upload an image with a face. For images with multiple faces, we will only detect the largest face. Ensure the face is not too small and is clearly visible without significant obstructions or blurring.
         | 
| 440 | 
             
            2. (Optional) You can upload another image as a reference for the face pose. If you don't, we will use the first detected face image to extract facial landmarks. If you use a cropped face at step 1, it is recommended to upload it to define a new face pose.
         | 
    	
        style_template.py
    CHANGED
    
    | @@ -4,6 +4,11 @@ style_list = [ | |
| 4 | 
             
                    "prompt": "{prompt}",
         | 
| 5 | 
             
                    "negative_prompt": "",
         | 
| 6 | 
             
                },
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
| 7 | 
             
                {
         | 
| 8 | 
             
                    "name": "Watercolor",
         | 
| 9 | 
             
                    "prompt": "watercolor painting, {prompt}. vibrant, beautiful, painterly, detailed, textural, artistic",
         | 
|  | |
| 4 | 
             
                    "prompt": "{prompt}",
         | 
| 5 | 
             
                    "negative_prompt": "",
         | 
| 6 | 
             
                },
         | 
| 7 | 
            +
                {
         | 
| 8 | 
            +
                    "name": "Spring Festival",
         | 
| 9 | 
            +
                    "prompt": "Flat illustration, a Chinese {prompt}, ancient style, wearing a red cloth, smile face, white skin, clean background, fireworks blooming, red lanterns",
         | 
| 10 | 
            +
                    "negative_prompt": "photo, deformed, black and white, realism, disfigured, low contrast, realistic, cropped, worst quality, missing fingers, extra digit, jpeg artifacts, signature, multiple, (lowres, low quality, worst quality:1.2)",
         | 
| 11 | 
            +
                },
         | 
| 12 | 
             
                {
         | 
| 13 | 
             
                    "name": "Watercolor",
         | 
| 14 | 
             
                    "prompt": "watercolor painting, {prompt}. vibrant, beautiful, painterly, detailed, textural, artistic",
         | 
